3 ms·
Ick. I have written my fair share of bash, and stuff like this is very common. Most things in bash are just inherently non-compositional and/or is riddled with
by ulrikrasmussen 7y ago
Ick. I have written my fair share of bash, and stuff like this is very common. Most things in bash are just inherently non-compositional and/or is riddled with weird corner cases that you just have to know about in order to not shoot yourself in the foot. This document [0] made the rounds on HN a while back, and it has, together with the associated tool, been something that I have regularly consulted whenever I have had to do anything non-trivial with bash (anything that has to deal with arguments to commands is already non-trivial to get right).
[0] https://github.com/anordal/shellharden/blob/master/how_to_do_things_safely_in_bash.md https://github.com/anordal/shellharden/blob/master/how_to_do...
- deleted 7y ago[deleted]