Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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 chilling in the Monastery: (5)
As of 2021-04-18 11:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?