Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

kilinrax's scratchpad

by kilinrax (Deacon)
on Jun 02, 2004 at 05:05 UTC ( [id://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
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-03-29 04:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found