Remove a path from your PATH variable
Apr 15, 2008 By Mitch Frazier
If you need to remove a path from the PATH variable before your script runs add this to the beginning of the script:
PATH=$(echo $PATH | sed -e 's;:\?/home/user/bin;;' -e 's;/home/user/bin:\?;;')
If you need, you can re-add it at the front of the list with:
PATH=/home/user/bin:$PATHOr you can re-add it at the end of the list with:
Mitch Frazier is an Associate Editor for Linux Journal.
- Readers' Choice Awards--Nominate Your Apps & Gadgets Now!
- Memory Ordering in Modern Microprocessors, Part I
- diff -u: What's New in Kernel Development
- Source Code Scanners for Better Code
- Tech Tip: Really Simple HTTP Server with Python
- [<Megashare>] Watch Mrs Brown's Boys Movie Online Full Movie HD 2014
- Security Hardening with Ansible
- Non-Linux FOSS: AutoHotkey
- RSS Feeds