SHARE
TWEET

Untitled

quantumech May 18th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. n=0
  2.  
  3. while true
  4. do
  5.     # If 'n' is even, print 'Tick'
  6.     if (( $n % 2 == 0 ))
  7.     then
  8.         echo "Tick"
  9.     # Else print 'Tock'
  10.     else
  11.         echo "Tock"
  12.     fi
  13.  
  14.     # Increment 'n'
  15.     (( n++ ))
  16.  
  17.     # Pause program for a second before printing next message
  18.     sleep 1
  19. done
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top