Bash Oneliners

Thu 02 October 2014
By alex

Infinite while loops

while true; do echo "It Never Ends"; done

The key is the placement of the semicolons.

while true; do ((x++)); echo $x `date +%T`; done
while true; do echo "Can you feel it?" | mail -s 'SMTP Test' [email protected]; done