4 ms·
As to parsing `ls`: Bash scripting is incredibly powerful but also terribly broken with horrible edge cases. E.g. if syntax, bash quoting, -print0, parsing str
by heinrichhartman 7y ago
As to parsing `ls`:
Bash scripting is incredibly powerful but also terribly broken with horrible edge cases. E.g. if syntax, bash quoting, -print0, parsing strings with regexps...
It's near impossible to build sound applications with bash.
Parsing output of almost any program breaks at _some_ point: https://dwheeler.com/essays/fixing-unix-linux-filenames.html https://dwheeler.com/essays/fixing-unix-linux-filenames.html
You need to know what data you are dealing with when writing shell scripts. bb does not aim to fix that. Just gradually improve.
- aidenn0 7y agoBut parsing ls (with no arguments) is just stupid when there is a safe alternative that already exists and is shorter.