You're viewing a comment by lava and its responses.

lava Permalink
September 11, 2012, 13:03

I think, your cheatsheet should contain warnings for dangerous bash-isms.
Those ones: <<<, >(), named descriptors, PIPESTATUS, |& (this one you already mentioned).

At least, there should be a warning to use explicitly #!/bin/bash instead of #!/bin/sh for scripts, because some distributions use dash by default for /bin/sh.

Comment Responses

iteratee Permalink
September 12, 2012, 07:28

Of those, only PIPESTATUS and |& are actually bash-only. The title of the cheatsheet contains "Bash". Anybody who assumes that means POSIX deserves to have things broken, as do users of horrible pointless shells such as Dash.

For various reasons, |& should probably be discouraged even in Bash scripts.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "floppy_342": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.