Posted By

beaknit on 04/02/11


Tagged

Shell


Versions (?)

Check Shell Params


 / Published in: Bash
 

URL: http://linuxcommand.org/wss0130.php

  1. #!/bin/bash
  2.  
  3. if [ "$1" != "" ]; then
  4. echo "Positional parameter 1 contains something"
  5. else
  6. echo "Positional parameter 1 is empty"
  7. fi

Report this snippet  

You need to login to post a comment.