Play with Linux - 12 - Command: while

12 . Command: while

The below “while” command is a script which provides you with colored date and file till you interrupt (ctrl + c). Just copy and paste the below code in terminal.
root@tecmint:~# while true; do echo "$(date '+%D %T' | toilet -f term -F border --gay)"; sleep 1; done
Linux while command
Linux while command
Note: The above script when modified with following command, will gives similar output but with a little difference, check it in your terminal.
root@tecmint:~# while true; do clear; echo "$(date '+%D %T' | toilet -f term -F border --gay)"; sleep 1; done

Comments

Popular Posts