Just started learning shell scripting..just a bit confused between the two. they seem to be doing the same operation? Can someone provide any example to show their different workings?
thanks.
Just started learning shell scripting..just a bit confused between the two. they seem to
Share
Yes. it does.
Cmdlet parameters can be shortened as far as they are unambiguous. Since
-Recurseis the only parameter ofCopy-Itemthat starts withRall of the following would do the same:However, this is mainly to aid interactive typing (as are aliases). In scripts you should usually rely on the cmdlet names and the full parameter names because when a parameter is added that conflicts with your use of a shortened parameter your script would stop working (mind you, this is no guarantee; for a while PSCX added a different
Get-Randomcmdlet even to PowerShell 2. thus overriding the built-in one – you could use the full cmdlet names, but that becomes unwieldy quickly).