News for hackers. Stuff that matters.
Re:PowerShell is open sourced and is available on Linux by cstross on Thursday August 18, 2016 @11:56AM (#12313494)
Bash is 27 years old. It was written to replace the Bourne shell, which is 39.

It is not terribly surprising that a 9 year old tool like Powershell made some improvements over an earlier tool that was already old enough to vote!

Re:PowerShell is open sourced and is available on Linux by ldiracdelta on Thursday August 18, 2016 @12:44PM (#12314071)
I don't see a tremendous amount of accumulated wisdom in Powershell. It may be newer, but I'm not sure they looked at prior art or had design members who were shell gurus in any other shell than `cmd.exe`, which is a horrific shell. Why are commands horrendously long in powershell? If you spend time in the shell, you don't want your fingers falling off due to overuse. Aside... one of the design decisions Microsoft took that absolutely blows my mind is using `\` for file hierarchies instead of `/` when you're writing an operating system in C!
Re:PowerShell is open sourced and is available on Linux by JeffreySnover on Thursday August 18, 2016 @01:38PM (#12314651)
There are lots of aliases for cmdlets for exactly this reason - interactive use. The verbose commands are useful when reading a script that isn't working at 3am in the morning when your boss is breathing down your neck to fix it "stat!".

RE - your aside '\' vs '/' - I think most of us still shake our head at that decision.

Jeffrey Snover [MSFT]

Re:PowerShell is open sourced and is available on Linux by xl on Thursday August 18, 2016 @09:32PM (#12317454)
I don't know if that was really a "decision" or an unfortunate compromise. DOS inherited /foo style command line parameters from CP/M, and DOS 1 didn't have a hierarchical file system, so there was no conflict with the path delimiter character UNIX was using. When DOS 2 introduced directories (and brought over the cd, md, rd, etc. commands from UNIX) suddenly we had to choose between massively breaking backwards compatibility or using something else, like \, as a delimiter.
Re:PowerShell is open sourced and is available on Linux by cstross on Thursday August 18, 2016 @12:59PM (#12314214)
> Aside... one of the design decisions Microsoft took that absolutely blows my mind is using `\` for file hierarchies instead of `/`

That decision goes back to MS-DOS 2.11, circa 1983. (DOS 1.0 didn't have subdirectories.) The model for DOS directories came from UNIX, which at that time was the very aggressively defended intellectual property of AT&T. As Microsoft was an AT&T licensee -- for Xenix, their version of AT&T System 7 UNIX, which was Microsoft's vision of the future of operating systems when PCs became powerful enough: they licensed it in 1978 and resold it via OEMs -- I speculate that they were afraid that AT&T might sue them for patent or copyright violation relating to the filesystem design if they went with a forward slash.

Re:PowerShell is open sourced and is available on Linux by pseudalopex on Thursday August 18, 2016 @01:49PM (#12314740)
They used \ for directories because most DOS programs used / for switches.

https://blogs.msdn.microsoft.com/larryosterman/2005/06/24/wh...

Re:PowerShell is open sourced and is available on Linux by JeffreySnover on Thursday August 18, 2016 @03:54PM (#12315835)
Interesting hypothesis! I'll ask Bill the next time I see him.

Jeffrey Snover[MSFT]

Re:PowerShell is open sourced and is available on Linux by cstross on Thursday August 18, 2016 @03:57PM (#12315860)
I'll take his word for it. (If he remembers trivia like that a third of a century later ...)
Re:PowerShell is open sourced and is available on Linux by xl on Sunday August 21, 2016 @03:02AM (#12329778)
Well, he made that goddamned donkey game...
Re:PowerShell is open sourced and is available on Linux by yread on Friday August 19, 2016 @04:43AM (#12318721)
> using `\` for file hierarchies instead of `/`

You know you can use both since like XP, right? You can even mix them up in one path which can look quite confusing c:/windows\system32/etc/drivers\

Re:PowerShell is open sourced and is available on Linux by ldiracdelta on Friday August 19, 2016 @02:10PM (#12322059)
`/` is not a first class citizen. You encounter different oddities throughout the windows environment in the shell and external utilities when you use `/`.
Re:PowerShell is open sourced and is available on Linux by jaykru on Thursday August 18, 2016 @01:31PM (#12314577)
There are many (*nix-inspired) aliases for frequently used commands though. I think PowerShell's preference for verbosity is a strength more than a deficit. Why "grep" when select-string "sls" is so much more intuitive and promotes readability.
Re:PowerShell is open sourced and is available on Linux by lottin on Thursday August 18, 2016 @12:18PM (#12313771)
The bash I'm running is actually 3 years old. You make it sound like bash was written 27 ago and no one has touched it since then.

Secondly, what constitutes an improvement is a matter of opinion. For example, I don't see this Powersell as an improvement at all.

Re:PowerShell is open sourced and is available on Linux by ktRolster on Thursday August 18, 2016 @02:03PM (#12314897)
Autocomplete in Bash was actually a revolutionary improvement
Re:PowerShell is open sourced and is available on Linux by jodrellblank on Friday August 19, 2016 @03:47AM (#12318529)
And autocomplete in PowerShell is again.

Cmdlets tell the shell their parameters, and their parameters are long names, so you can just tab through them to find a) the available parameters and b) the ones which might help you.

Re:PowerShell is open sourced and is available on Linux by Sylos on Thursday August 18, 2016 @12:21PM (#12313818)
Well, it's not an improvement, it's just a different design-choice. I for example much prefer Bash's way of doing it.

Also, Bash does have a way of doing it the Powershell-way, if you want that, as others have commented.

Which is also why I disagree with your statement. Bash may be old, but neither the underlying technology nor the use-case changed much in that time. So, there is not a whole lot where you can innovate with a new tool, at least not for such basic tasks, and instead, Bash has matured throughout 27 years to perfectly fit that underlying technology and use-case that millions of people have.