Fun infinite loops : bash #2

A second fun loop with Terminal on the Mac is something with time

Open the Terminal.App from your Mac by holding down command space and typing Terminal

while true
do
date
date +%T
sleep 1
done

Thu Nov 7 07:38:50 PST 2013
07:38:50
Thu Nov 7 07:38:51 PST 2013
07:38:51
Thu Nov 7 07:38:52 PST 2013
07:38:52
Thu Nov 7 07:38:53 PST 2013
07:38:53

Control-C to tell the computer to stop, remember the computer is not very smart like humans

See all posts about Fun infinite loops

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s