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.
|Daily Giveaway - Fun Prizes from Red Hat!||Oct 25, 2016|
|Installing and Running a Headless Virtualization Server||Oct 25, 2016|
|Ubuntu MATE, Not Just a Whim||Oct 21, 2016|
|Non-Linux FOSS: Screenshotting for Fun and Profit!||Oct 20, 2016|
|Nasdaq Selects Drupal 8||Oct 19, 2016|
|Canonical Ltd.'s Ubuntu Core||Oct 19, 2016|
- Installing and Running a Headless Virtualization Server
- Daily Giveaway - Fun Prizes from Red Hat!
- Daily Giveaway
- Ubuntu MATE, Not Just a Whim
- Nasdaq Selects Drupal 8
- Secure Desktops with Qubes: Compartmentalization
- Build Your Own Raspberry Pi Camera
- Canonical Ltd.'s Ubuntu Core
- Non-Linux FOSS: Screenshotting for Fun and Profit!
- Polishing the wegrep Wrapper Script