In what way? I use PowerShell daily and hardly ever have to Google [things that I've used more than once]. I imagine if I picked up another language, I'd be Googling furiously, but that shouldn't disqualify the language.
In what way? I use PowerShell daily and hardly ever have to Google [things that I've used more than once]. I imagine if I picked up another language, I'd be Googling furiously, but that shouldn't disqualify the language.
Powershell is like a gas station men's room in the middle of nowhere. It's better than nothing but nothing to celebrate.
What tool(s) have you tried using to write PowerShell scripts?
as opposed to bash/posix with its confusingly named utilities?
want to rename something? it's mv
want to tell the time? it's date
why is the command to download something curl/wget?
what's the difference between if [[ stuff ]] and if [ stuff ] anyways?
the list goes on. and no, man pages don't help if you don't even know which command to look for. at least powershell has a somewhat consistent naming convention for its commands (verb-something) so you can at least sort of guess what the command is.There is a rename command as well. But apart from the first time I tried to rename a file I've never had trouble remembering it. There is a good reason for it to, internally it is a move operation.
> want to tell the time? it's date
Is this different in powershell? Some quick googling indicates the Get-Date is the method you want and being .net based everything deals with DateTime objects.
> why is the command to download something curl/wget?
I find this easier to remember than Invoke-WebRequest, or is it Invoke-RestMethod?
If they were so hard to remember that could be aliased to something similar, but I've never seen anyone bother.
Edit - I mean I've never heard anyone going the other way and suggest doing "alias Invoke-WebRequest=\"curl\"" in bash.
I find this easier to remember than Invoke-WebRequest, or is it Invoke-RestMethod?
easier to remember: maybe, but much less discoverable than Invoke-WebRequest/Invoke-RestMethod. this seems to be the overall trend for linux shell commands. a few characters long for easy typing, but otherwise arbitrary strings that you have to remember and have 0 discoverability. GGP's comment was about how you had to search for how to do everything in powershell, so in that respect powershell is at least not worse than bash.
Have you ever heard of `apropos`?
I really liked DEC's VMS DCL ... and "help" was top notch.
want to tell the time? it's Get-Date ("time" won't work, neither will "get-time")
why is the command to download something Invoke-WebRequest?
what does '&"C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:about' do?
and if you want to complain about ridiculous syntax, why the hell is ` the escape character instead of \ like every other language?
so... working as intended? (unless you subscribe to the belief that rename is the same operation as moving)
>want to tell the time? it's Get-Date ("time" won't work, neither will "get-time")
fair point, although at least it doesn't alias any existing commands (typing time will get you a confusing output of 0 user, 0 kernel, 0 real)
>what does '&"C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:about' do?
& = run program in specified path. i agree this isn't used in any other shell language, but then again all the linux shells are fairly similar to start with. it's probably there because otherwise it won't be able to differentiate between a command that you want to execute, and a string literal.
also for windows command line programs, it's fairly stander to use /arg:value for command line arguments instead of --arg value
>and if you want to complain about ridiculous syntax, why the hell is ` the escape character instead of \ like every other language?
probably because \ is used in windows paths, so to avoid unnecessarily quoting every path, they chose an odd line continuation character.
also, about what you were responding to for the last two points: that was more a poke at how '[' isn't actually part of the syntax, but in fact an alias for test.
Or.. you could actually encourage people to use sane path separators. The rest of the world uses a normal slash which works most of the time in Windows too.
CP/M lost. URLs won.
It's like UTF-16. They somehow had the means to replace Windows-1252 with UTF-16, but they can't bring themselves to move to UTF-8 which everyone else and the web uses instead.
You find it hard to believe that someone who uses a tool daily gets to know it?