Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [ $# = 0 ]
- then
- echo "Vous n'avez pas passé de paramètre"
- exit 1
- else
- myPath=$(echo $PATH | tr ':' '\n')
- for arg in $@
- do
- for aPath in $myPath
- do
- if echo "$aPath" | grep -q "$arg"
- then
- echo "$aPath"
- fi
- done
- done
- fi
Add Comment
Please, Sign In to add comment