3 ms·
TIL about the pipe/newline, thanks. Edited.
by leblancfg 3y ago
TIL about the pipe/newline, thanks. Edited.
- rgrau 3y agoAnother advantage of pipes at the end is that you can comment lines and the full pipeline still works. Some time ago I wrote a bunch of tips to make more ergonomic bash scripts: https://raimonster.com/scripting-field-guide/index.html https://raimonster.com/scripting-field-guide/index.html Also, Perl's diamond operator does the DWIM thing with files/stdin, and it's used directly as a line iterator. It handles multiple files (or none) in a row, which is a nice plus :) https://perlmaven.com/the-diamond-operator https://perlmaven.com/the-diamond-operator