ADMIN - Explore the new world of system administration! ADMIN is a smart, technical magazine for IT pros on heterogeneous networks. Each issue delivers technical solutions to the real-world problems you face every day. Learn the latest techniques for better:
network security
system management
troubleshooting
performance tuning
virtualization
cloud computing
on Windows, Linux, Solaris, and popular varieties of Unix.
Microsoft’s new PowerShell relies on .NET framework libraries and thus has access to a treasure trove of functions and objects. How does PowerShell measure up to traditional shells like Bash?
Both Bash and the Windows Vista PowerShell include commands for navigating directories, managing files, and launching other programs. System administration is an important duty for the shell, and Bash and PowerShell are equipped to help manage systems from the command prompt. Whereas Bash typically relies on a combination of newer tools and classic Unix utilities, the PowerShell has its own set of command-line programs. Windows refers to PowerShell commands as cmdlets. The PowerShell cmdlet called Get-Process is a counterpart to ps, and the cmdlet Get-Content corresponds to less. PowerShell differs significantly from previous Windows command shells. In this article, I look at how Windows Vista PowerShell compares with Bash.
But remember in Windows command names include uppercases but still, the usage is caseless. The change in command names and standard folder names, for that matter, are so predictable for the next era, because it just gets easier. For instance "Get_content" will naturally change to "MyComputer.Shell.Get_my_scrolled_content_which_i_cannot_see" No need to memorise, just type what comes naturally.
Endlessly reasurring
vook
Jul 19, 2008 8:24pm GMT
This kind of activity by Microsoft, if anything, continues to remind me how grateful I am that I abandoned MS OS's completely years ago and decided to work solely in Unix or Unix-like OS's.
The shell commands that I learned and used in the mid 1980's in middle-school on a university VAX system have remained largely unchanged over the last 20+ years. I actually applaud any move by Microsoft to improve their system shell. I can't understand for the life of my why they would use commands like "Get-content" when they could just improve existing commands (like "type", or whatever). Why use caps in basic shell functions? It really makes no sense. Why use an 11 character command for something with the functionality of "more", "less", or "type /p" (or whatever it is).
ah, but what can ya do?
RE: discouraging shell programming
Jeffrey Snover
Jul 09, 2008 3:54am GMT
> It is funny to see how MS just rurns around... During the last 20 years MS did everything to
> discourage the usage of shell programming.
True but we are incapable of sustained error. ha ha.
It is funny to see how MS just rurns around... During the last 20 years MS did everything to discourage the usage of shell programming.
Good work.
Jeffrey Snover
Jul 08, 2008 5:04am GMT
Good job comparing PowerShell and Bash. You clearly took the time to understand PowerShell and you gave it a very fair comparision given the space constraints. Your readers might be interesting in a set of next level comparisons between the two. I think you'd find areas where PowerShell does much better and much worse. I think both communities would get a lot out of that and that both communities have a lot to learn from each other. Clearly we've learned a lot from the Unix community (a number of us have Unix backgrounds) as well as from the VMS, AS400 and TCL communities (all of which have great aspects).
Get 3 Issues + 3 DVDs for the price of a single issue!
Let Linux Magazine's hands-on, technical articles guide you in your daily Linux use. Check out bonus DVDs like Ubuntu, SUSE, or Fedora and save the download.
Only available for a limited time. Don't miss out!
Comments
Re: Endlessly reasurring
Joh Jul 21, 2008 10:15am GMT
But remember in Windows command names include uppercases but still, the usage is caseless. The change in command names and standard folder names, for that matter, are so predictable for the next era, because it just gets easier. For instance "Get_content" will naturally change to "MyComputer.Shell.Get_my_scrolled_content_which_i_cannot_see" No need to memorise, just type what comes naturally.Endlessly reasurring
vook Jul 19, 2008 8:24pm GMT
This kind of activity by Microsoft, if anything, continues to remind me how grateful I am that I abandoned MS OS's completely years ago and decided to work solely in Unix or Unix-like OS's.
The shell commands that I learned and used in the mid 1980's in middle-school on a university VAX system have remained largely unchanged over the last 20+ years. I actually applaud any move by Microsoft to improve their system shell. I can't understand for the life of my why they would use commands like "Get-content" when they could just improve existing commands (like "type", or whatever). Why use caps in basic shell functions? It really makes no sense. Why use an 11 character command for something with the functionality of "more", "less", or "type /p" (or whatever it is).
ah, but what can ya do?
RE: discouraging shell programming
Jeffrey Snover Jul 09, 2008 3:54am GMT
> It is funny to see how MS just rurns around... During the last 20 years MS did everything to> discourage the usage of shell programming.
True but we are incapable of sustained error. ha ha.
Jeffrey Snover [MSFT]
Windows Management Partner Architect
Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell
Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx
MS is rediscovering the wheel...
Sandor Laza Jul 08, 2008 3:34pm GMT
First of all, nice article!It is funny to see how MS just rurns around... During the last 20 years MS did everything to discourage the usage of shell programming.
Good work.
Jeffrey Snover Jul 08, 2008 5:04am GMT
Good job comparing PowerShell and Bash. You clearly took the time to understand PowerShell and you gave it a very fair comparision given the space constraints. Your readers might be interesting in a set of next level comparisons between the two. I think you'd find areas where PowerShell does much better and much worse. I think both communities would get a lot out of that and that both communities have a lot to learn from each other. Clearly we've learned a lot from the Unix community (a number of us have Unix backgrounds) as well as from the VMS, AS400 and TCL communities (all of which have great aspects).Cheers!
Jeffrey Snover [MSFT]
Windows Management Partner Architect
Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell
Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx