bashoneliners.com

Welcome to bashoneliners.com, a curated collection of practical and well-explained Bash one-liners, snippets, tips and tricks. We aim to make each published one-liner to be of high quality: useful, easy to read, follows best practices, with clear, detailed, accurate explanation. These one-liners should help you automate tasks, troubleshoot problems, whether it be in system administration, file management, networking or programming.

Up all docker services as detached mode over all immediate subdirectories

for dir in $(ls -d */); do eval $(cd $PWD/$dir && docker-compose up -d && cd ..); done;

August 17, 2018gatero

Perform git commit with a random message from whatthecommit.com

git commit -m "$(w3m whatthecommit.com | head -n 1)"

January 5, 2018Jab2870

Uses 'at' to run an arbitrary command at a specified time.

echo 'play alarmclock.wav 2>/dev/null' | at 07:30 tomorrow

February 4, 2012Anon5MAQumYj