I've been playing with PowerShell a little and decided to make some Unix commands that were not ported over.
Command | Function |
whoami | function whoami |
~ (works better if it was not an alias) | function ~ |
mkdir | function mkdir([string] $name) |
touch | function touch([string] $path = ".\", [string] $name) |
find (still currently working on this one. I need to implement wild cards) | function find([string] $name = "", [string] $ext = "", [string] $drive = "C:") $files | add-member --type PropertySet "FindInfo" ([string[]]("Name","FileType","Extension","CreationDate")) -force |
I figured re-writing Unix commands might help me learn powershell. I'm going to use http://en.wikibooks.org/wiki/Guide_to_UNIX/Commands as source of basic Unix commands to implement.
No comments:
Post a Comment