Posted By

kalmi on 07/09/10


Tagged

arguments


Versions (?)

Test first command line argument


 / Published in: Bash
 

  1. if [ -z "$1" ]; then
  2. # No command-line arguments.
  3. else
  4. # First command-line argument is $1.
  5. fi

Report this snippet  

You need to login to post a comment.