3 ms·
Practical Shell Patterns I Use
- tsujp 5y agoThere's also these resources for more vetted patterns: (1) Bash: https://github.com/dylanaraps/pure-bash-bible https://github.com/dylanaraps/pure-bash-bible (2) POSIX Shell: https://github.com/dylanaraps/pure-sh-bible https://github.com/dylanaraps/pure-sh-bible
- oweiler 5y agoFor killing matching processes I prefer killall or pkill. For infinite loops I prefer the slightly faster while :; do # do sth done
- marginalia_nu 5y agoThe last example $ kubectl apply -f <(cat << EOF … EOF ) can be written $ kubectl apply -f- <<EOF # ... Piping from cat is a pretty big red flag that you are doing whatever you are doing in a roundabout way.
- zwischenzug 5y agoNice, yes of course. I always forget that format though :)