3 ms·
printf 'the form\n' \ | tr a-z A-Z golfs to printf 'the form\n' | tr a-z A-Z but that only saves like one or two keystrokes but is probably good
by tolciho 4y ago
printf 'the form\n' \
| tr a-z A-Z
golfs to
printf 'the form\n' |
tr a-z A-Z
but that only saves like one or two keystrokes but is probably good to know for shell trivia questions or when implementing something that supposedly can handle shell continuation lines
- 1vuio0pswjnm7 4y agodjb used this style when shell scripting and I believe that is where I picked it up.^1 I have not seen (m)any HN commenters publishing their work for public scrutiny who are more skilled in programming, including C, than djb. Other programmers, good ones, but not a large number, copied his C style. 1. An extreme example https://raw.githubusercontent.com/drudru/qhasm/master/qhasm-amd64 https://raw.githubusercontent.com/drudru/qhasm/master/qhasm-...