View Full Version : Bash Pitfalls

December 26th, 2010, 06:37 PM
I've found a nice and enlightening article on reddit, thought I'd share.

December 26th, 2010, 07:44 PM
Pitfall #2 is the main reason I left bash for zsh. If I execute `cp $from $to`, I don't expect $from and $to to be further split up.

Well, it's the word splitting behaviour in general I don't like. Zsh does it much more sanely, though that means that very few of my (even trivial) shell scripts work without zsh, which possibly isn't a good thing.

December 26th, 2010, 08:03 PM
Do you think he should call them pitfalls as opposed to understanding the proper Syntax (http://en.wikipedia.org/wiki/Syntax).

Well at least he gave the proper answers. :p