4 ms·
I highly doubt that powershell is better than bash, unless you're perhaps only counting bash and its builtins and disregarding the whole environment of binaries
by MoreTuple 11y ago
I highly doubt that powershell is better than bash, unless you're perhaps only counting bash and its builtins and disregarding the whole environment of binaries around it.
- MPSimmons 11y agoHave you spent any time with PowerShell? It's completely amazing. And I say this as a hard core Linux user since 1996.
- iamcreasy 11y agoWhat makes a shell amazing?
- icholy 11y agoBetter pipes edit: and better tab completion.
- Corrado 11y agoI've spent quite a bit of time recently with PowerShell and I have to say that at best, I'm underwhelmed. I can see the potential with PS but there are too many things that are just left out by default. The documentation seems incomplete and very clunky to actually use; it's hard to find what command you want and some docs are just plain wrong. Even using third party docs is frustrating. Honestly, it reminds me of the PHP docs, and not in a good way. Job control seems to be very clunky. I can't seem to push things into the background reliably in a PS1 script. Some things seem to work OK but others just background and disappear. Another problem I've had is appending to files; you can output log information to a file (ie. ls > ls.log) but you can't append to a log file (ie. ls >> ls.log). There may be a way to do it, but it probably involves writing a command and loading it somewhere. That's the most annoying thing I find when living in the Windows world; there doesn't seem to be a good representation of $HOME. Where do I keep my SSH keys? When I create PS1 scriptlets how do I ensure they are loaded in a new PS1 shell? I'm sure there are answers to this but, as I said before, the docs are not the best. Maybe Microsoft should author a BASH --> PS1 translation guide. :)
- bitcrazed 11y agoTo your second point, @home is a default variable $home and can be de-reffed from '~': PS C:\Users\rich> ls ~/.ssh Directory: C:\Users\rich\.ssh Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- 1/14/2016 19:30 3247 id_rsa -a---- 1/14/2016 19:30 744 id_rsa.pub -a---- 1/14/2016 22:12 1595 known_hosts
- bitcrazed 11y agoI think you're suffering from PEBCAC ;) You can append content to a file using >>: PS C:\Users\rich> "Foo" > 1.txt PS C:\Users\rich> cat .\1.txt Foo PS C:\Users\rich> "Bar" >> 1.txt PS C:\Users\rich> cat .\1.txt Foo Bar