Test first command line argument


/ Published in: Bash



Copy this code and paste it in your HTML
  1. if [ -z "$1" ]; then
  2. # No command-line arguments.
  3. else
  4. # First command-line argument is $1.
  5. fi

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.