News for hackers. Stuff that matters.
Re:The increased use of PowerShell in attacks [pdf] by Houshalter on Saturday May 20, 2017 @01:57AM (#14381233)
The weird names was only one of his complaints and it's relatively minor. Everything about bash seems really weird and over complicated. I am trying to learn it now. It's great for trivial stuff, but for anything nontrivial I end up going back to a real programming language.

I wanted to do floating point math. The recommended answer is to pipe your data into a better programming language. You can't even do math in bash. On another occasion I wanted to make a simple program that opens a random file. The recommended answer breaks in the simple case where files have spaces in them. The correct answer I found is this horrible mess of weird characters and it's completely incomprehensible. The best answer someone submitted was just to call one line of python from bash...

Re:The increased use of PowerShell in attacks [pdf] by erikbye on Saturday May 20, 2017 @03:55AM (#14381461)
The fact that your shell is not a programming language is not a real gripe. Treat your shell as a shell and you'll be fine.
Re:The increased use of PowerShell in attacks [pdf] by Houshalter on Saturday May 20, 2017 @04:46AM (#14381539)
Ok sure, but being able to perform operations on a bunch of files shouldn't be hard in a shell language. And mathematical operations are an incredibly basic thing that are necessary for almost anything.

And why is it so wrong for the shell to be a decent programming language? It's not impossible. It doesn't need to make anything harder or more complicated. And it adds a ton of functionality. There are tons of people programming in Bash and powershell anyway.

Re:The increased use of PowerShell in attacks [pdf] by userbinator on Saturday May 20, 2017 @12:48PM (#14383195)
The correct answer I found is this horrible mess of weird characters and it's completely incomprehensible.

Someone who tries to learn Chinese may have the same thought after having been exposed to nothing but English. The keyword is "language".

The quoting rules in bash/sh are not difficult to memorise, and definitely a must-learn.

I wanted to do floating point math.

Maths is not a strong point of shell languages because they were designed more for string manipulation and gluing other programs together. Try doing pipelines and redirection in a "real programming language", for a contrasting example.

"The right tool for the job".

Re:The increased use of PowerShell in attacks [pdf] by JadeNB on Saturday May 20, 2017 @07:55AM (#14381996)
> You can't even do math in bash.

You shouldn't, certainly, but, as to 'can't', I think that `expr` (or, as I just learned from ABS, `$(( ))`) covers a lot of basic uses: http://www.tldp.org/LDP/abs/html/arithexp.html .