Check Shell Params


/ Published in: Bash
Save to your folder(s)



Copy this code and paste it in your HTML
  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

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.