You’ll never guess what I learned from https://www.uninformativ.de/blog/postings/2023-11-19/0/POSTING-en.html. I’ve never seen for i do
in shell scripts. Turns out, that walks over all positional arguments. So I reckon my for i in "$@"; do
can now be shorter from now on. Very interesting in that detailled explanation to see all the – at least to me – inconsistent handling of semicolons and line breaks.
@lyse@lyse.isobeef.org Cool!
@movq@www.uninformativ.de You’re good, it’s POSIX-compliant. ;-) I also was taught $*
first instead of "$@"
. Looks like a common thing. :-) Shell has just soooooo many quirks and inconsistencies, it is quite hard to master it. But we’ll never get rid of it.