Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. echo "Which directory would you like to include with PATH?"
  4. read NewPath
  5.  
  6. if [ -e "$NewPath" ]; then
  7. echo "Directory" $NewPath "exists,"
  8. echo "so" $NewPath "was appended to PATH."
  9. PATH=$PATH:$NewPath
  10. export PATH
  11. echo "Your PATH environment variable is now:"
  12. echo $PATH
  13. else
  14. echo "Sorry, I'm afraid that" $NewPath "doesn't exist."
  15. fi
  16.  
  17. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement