News for hackers. Stuff that matters.
Re:Ask HN: How can I get better at bash? by vram22 on Monday June 26, 2017 @07:20PM (#14641242)
>All of test(1) as you can use them in any if statement (/usr/bin/[ is a real command!):

Yes, and not only in an if statement. You can also use test or [ command in commands of the form:

test condition && commmand2

or

test condition || command2

which will only work if the condition is true or false, respectively (IIRC, need to check this).

Re:Ask HN: How can I get better at bash? by SEJeff on Tuesday June 27, 2017 @11:28AM (#14646270)
That is correct, no need to check on this. I've done this for years :)
Re:Ask HN: How can I get better at bash? by vram22 on Tuesday June 27, 2017 @12:05PM (#14646655)
Thanks. Well, I was nearly 100% sure too (been using Unix for years too (from before Linux was created)), but "nearly" is not 100% (since I don't use that feature often), and don't like to make claims I am not sure about without a disclaimer, hence I made one :)