daily pastebin goal
65%
SHARE
TWEET

Untitled

a guest Dec 6th, 2018 60 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. #!/usr/bin/bash
  2. # Note, "[[ ]]" and "if [] && []" is bash/ksh88 ONLY
  3.  
  4. if [ -z ${1} ]; then tweetnum=1
  5. elif [[ ${1} =~ ^[0-9]+$ ]] ; then
  6.         if [ ${1} -gt 0 ] && [ ${1} -lt 11 ]; then tweetnum=$1
  7.         else echo "Number outside of range 1..10"; exit 0;
  8.         fi  
  9. else echo "That's not a number. Please use a number in the range 1..10"; exit 0;
  10. fi
  11.                                                                                                                                                                                                                                                                          
  12. echo "Tweet # ${tweetnum}"
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