Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [ $# -ne 1 ]
- then
- echo "Ce programme n'accepte qu'un et un seul argument"
- exit 1
- else
- path="$(cd $(dirname $1); pwd)/$(basename $1)"
- total=""
- while [ $path != "/" ]
- do
- total="$path $total"
- cd ..
- path=$(pwd)
- done
- for t in $total
- do
- if [ ! -e $t ]
- then
- echo "$t n'existe pas"
- fi
- done
- fi
Add Comment
Please, Sign In to add comment