first.sh 415 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. name=`basename $0`
  3. echo "Name of the running program: $name"
  4. if [[ -e $FILENAME ]]
  5. then
  6. echo $FILENAME exists
  7. fi
  8. echo "The first parameter is $1."
  9. echo "The second parameter is $2."
  10. valu=$1
  11. minim=$2
  12. if [[ $valu -lt $minim ]]
  13. then
  14. echo "value is too min"
  15. fi
  16. if (( $? )) ; then echo "previous comm failed" ; fi
  17. [[ -d $DIR ]]
  18. for ff
  19. do
  20. echo here is arg: $ff
  21. done
  22. echo number of args is $#