Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

kilinrax's scratchpad

by kilinrax (Deacon)
on Jun 02, 2004 at 05:05 UTC ( #359168=scratchpad: print w/replies, xml ) Need Help??

# path-manipulating shell functions function lspath { echo $PATH | tr ':' '\n' } function makepath { unset NEW_PATH while read PATHEL; do NEW_PATH="$NEW_PATH:$PATHEL" done echo ${NEW_PATH#:} } function uniqpath { PATH=`lspath | awk '{seen[$0]++; if (seen[$0]==1){print}}' | makep +ath` } function cleanpath { uniqpath PATH=`lspath | sed -e 's|\/$||' -ne '/./p' | makepath` } function addpath { PATH=$1:$PATH cleanpath } function appendpath { PATH=$PATH:$1 cleanpath } function delpath { PATH=`lspath | grep -v "^$1\$" | makepath` } function editpath { TEMP=`mktemp "/tmp/${FUNCNAME}.XXXXXX"` lspath > $TEMP ${EDITOR:-vi} $TEMP PATH=`makepath < $TEMP` rm -f $TEMP }
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (1)
As of 2020-12-05 22:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (65 votes). Check out past polls.

    Notices?