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.
screen -d -m -S some_name ping my_router
while ! ping -c1 the_host_down; do sleep 1; done && date | mail -s 'the host is back!' me@example.com
ping some_host | while read LINE; do echo $(date): $LINE; done