LWN.net Logo

Evolution of shells in Linux (developerWorks)

Evolution of shells in Linux (developerWorks)

Posted Dec 10, 2011 3:00 UTC (Sat) by Cyberax (✭ supporter ✭, #52523)
In reply to: Evolution of shells in Linux (developerWorks) by nix
Parent article: Evolution of shells in Linux (developerWorks)

I understand that 'whoami' is used as an example.

I finally understood what author wants and gave an answer: "@($var -split ' ')". It does the braindead thing that was requested.

Why braindead? Because good PowerShell scripts would just use an _array_ and 'splat' it when required, instead of constructing shell arguments as raw strings.

And no, this hack with splitting string into arguments is definitely not required to work with legacy code.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds