On Tue May 14 18:11:16 2024 Страхиња Радић wrote:
> Antipatterns are bad. I don't mean the ellipsis in `ls -l ...`. I mean
> things like
>
> cat file | grep hello | cat | sed 's/hello/world/g' | cat - > output
>
> for file in `echo `ls *` `; do echo $file; done
>
> ls -l | awk '{ print $5 }' # different things with different ls'es
> # under different locales, and on
> # different systems, with differently
> # named files
>
> which are something a novice will see and adopt, especially when it is
> not even communicated as a "sketch", and a seasoned user of shell will
> just be annoyed with.
This recalls me again the quote of the article you linked:
"..., unless extreme portability is more important..."
Let's make it short. Would you guarantee that your shell scripts work
on any unix-like system?
And here I abandon the discussion, needless to say that I appreciate all
your advices.
Greetings!