Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- echo "Which directory would you like to include with PATH?"
- read NewPath
- if [ -e "$NewPath" ]; then
- echo "Directory" $NewPath "exists,"
- echo "so" $NewPath "was appended to PATH."
- PATH=$PATH:$NewPath
- export PATH
- echo "Your PATH environment variable is now:"
- echo $PATH
- else
- echo "Sorry, I'm afraid that" $NewPath "doesn't exist."
- fi
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement