4 ms·
Read the whole POSIX specification for the "Shell Command Language", and in particular how input is processed by the shell through all the multiple expansion pa
by kazinator 6y ago
Read the whole POSIX specification for the "Shell Command Language", and in particular how input is processed by the shell through all the multiple expansion passes.
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18 https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V...
From there, you have a better background for reading the documentation of shell implementations, like Bash.
Also study Awk:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html https://pubs.opengroup.org/onlinepubs/9699919799/utilities/a...
Those who don't know Awk do comical things with cockamamie combinations of cut, sed, grep, echo ... and clumsy loops written in shell.
Other than shell syntax and semantics, it's a matter of knowing a large number of utilities.
- 2OEH8eoCRo0 6y agoI find Perl to be good for these things.
- jrootabega 6y agoThat is, or was, Perl's purpose, right? Process pipelines of text data but in a more structured way?