5 ms·
A lot of bash errors are not understanding possible cases due to white space.. which shellcheck catches. After using it for a while, I don’t even really worry a
by cwingrav 3y ago
A lot of bash errors are not understanding possible cases due to white space.. which shellcheck catches. After using it for a while, I don’t even really worry about white space because of the good habits I’ve learned/(been forced to use).
- ndsipa_pomu 3y agoThat's all well and good until you come across a filename with a linefeed in it - null termination is where it's at! (I can't actually recall encountering a filename that includes a linefeed)
- Joker_vD 3y agoI've got several empty files on my desktop (on Windows) serving as sticky notes of some sort, and they have line breaks in their names, obviously.
- ndsipa_pomu 3y agoI didn't even know that Windows supported that, but I try to keep away from it as much as possible. Makes for an interesting test of scripts, I suppose. Sometimes, I script BASH to cope with any any filenames, but it depends on the usage as a lot of the time you can guarantee that files will be at least semi-sensible.