Tuesday, May 26, 2015

Sleep command - an example shell script

The following script clear screen and update the date every second. So it seems like the running digital clock.

#!/bin/bash
#running digital clock
while [ : ]
do
clear
date
sleep 1
done

0 Comments: