https://bencane.com/2014/06/06/8-tips-for-creating-better-bash-scripts/ ====== remove old files ====== find /path/to/files* -mtime +5 -exec rm {} \; ====== Headline ====== [[https://devhints.io/bash|Bash scripting cheatsheet]] [[https://www.jasonmayberry.net/2019/06/new-bash-linux-cheatsheet-wallpaper.html|new bash Linux Cheatsheet Wallpaper]] ====== sed / awk / opkg ====== * find packages installed asterisk15 and prepare the cmd for asterisk16 installation opkg list_installed | grep asterisk | awk '{print $1}' | sed 's/^/opkg install /' | sed 's/asterisk15/asterisk16/'