While Loop – Infinite mode

How to run while loop in infinite mode?

Below is the simple example which copies file justgeek.txt to different location as soon as it gets created. This while loop runs infinite mode and it never stops.

while :
cp -v justgeek.txt /home/justgeek

One thought to “While Loop – Infinite mode”

Leave a Reply

Your email address will not be published. Required fields are marked *