whileで1秒毎にコマンドを実行する
while true; do date; sleep 1s; done
whileで回数を決めてコマンドを実行する
i=1; while [ $i -le 10 ]; do echo $i; i=$(expr $i + 1);done
watchで1秒毎にコマンドを実行する
watch -n 1 date
Go to list of users who liked
More than 5 years have passed since last update.
while true; do date; sleep 1s; done
i=1; while [ $i -le 10 ]; do echo $i; i=$(expr $i + 1);done
watch -n 1 date
Register as a new user and use Qiita more conveniently
Go to list of users who liked