It is cross-platform so you can use your scripts anywhere.
Don't use python or go or ruby or whatever as those are not scripting languages.
IMO Bash is horror and should die already.
It is cross-platform so you can use your scripts anywhere.
Don't use python or go or ruby or whatever as those are not scripting languages.
IMO Bash is horror and should die already.
Just use a proper scripting language.
Verbosity of powershell is optional, I don't use it.
> consistency that comes with all Microsoft designed products.
Oh, lets not troll here.
Why is that a disaster? What problem has it caused you that wouldn't have happened if it wasn't an executable?
[[ is a non-executable version of [. Does that solve your problem?
Its disaster because launching process to achieve simple math expression is just ridiculous, besides being slow and besides having to terminate it with ;. Its wrong on so many levels I don't even know where to start, they must have been smoking some nasty things back in time.
That's why you don't do that. $(( math goes here ))
In any case, worrying about subprocesses and their slowness in a shell is completely moot. Shells aren't built to run fast, and are rather built to work with executables conveniently.
> besides having to terminate it with ;
Is that really a complaint? Does that bother you a lot? This seems so petty, I'm a bit lost for words.
[ is a regular command because the control structures of the shell are flexible enough to support any command for their conditions.
I don't know if you're asking for the shell to make a super-special exception in its syntax for that particular command just so that people won't have to type ; under certain circumstances, or if you're asking for control structures to be more restricted and allow only [ instead of any command for their conditions.
> they must have been smoking some nasty things back in time.
So far, you've given the impression of someone complaining that screwdrivers really suck for inserting nails. I wonder if the issue is that you've never seen hammers before or if you've never seen screws before. Or maybe the issue is you believe each tool should be equally fit for everything?
And even if not, so what? Every argument you make is a shifting of a goalpost.
How big really? Can't be more then 200MB? Should be less then minute to download and install? If you have docker, can you go that route?
Also, if you account the fact that you have variants of many other popular tools included OTB is that really a downside ?
That is certainly different concern, you want fast and practical script programming and why would you care if it has first time latency of couple of minutes if you are set good forever after that ?
The shell was running from tmpfs (so basically a RAM disk). I have a decent processor and an NVMe SSD, and this is what I see (it was tested 10 times in a row to pull everything into the page cache properly, and the numbers are pretty stable):
$ time ./pwsh <<<"" >/dev/null
real 0m1.050s
user 0m1.464s
sys 0m0.067s
More than a second to execute an empty 'script', and even longer to get to the interactive prompt (which is harder to time properly so I'm not publishing any numbers).It's even slower on an older Windows laptop which I have lying around (starts in about 3-4 seconds). Absolutely terrible for an interactive shell/script execution engine.
Just for comparison's sake, the same laptop can run an empty bash script in 2-3 milliseconds. This is very important when running build jobs, for example.
> Measure-Command { pwsh -NoProfile -NoLogo exit }
Days : 0
Hours : 0
Minutes : 0
Seconds : 0
Milliseconds : 254
BTW, Windows OS is often subject of Windows Defender and other AVs which are not present on Linux machines and their slowdown of the system is phenomenal. $ time ./pwsh -NoProfile -NoLogo <<<'' >/dev/null
real 0m0.456s
user 0m0.388s
sys 0m0.040s
Much better, but I still wouldn't use this even as an interactive shell, as I open a few hundred terminal windows each day.There's no defender (or anything similar) on that other machine. It also has an SSD. With an older HDD powershell started in about 10-15 seconds there (while cold startup time for bash was something like a second, and instantly afterwards).