Xioth

Bash - TD1 - lastArg.sh

Jan 25th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.13 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. if [ $# = 0 ]
  4. then
  5.     echo "Vous n'avez pas passé de paramètre"
  6.     exit 1
  7. else
  8.     echo ${!#}
  9.     # OU
  10.     echo $BASH_ARGV
  11. fi
Add Comment
Please, Sign In to add comment