From: Abramson, Stuart (SAbramson@Wabtec.com)
Date: Tue Dec 02 2003 - 10:13:43 EST
Hpux-admins:
I want to separate and sort my $PATH, which is getting way out of hand on
some of our machines:
# echo $PATH
/usr/sbin/:/usr/bin/:/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/opt/n
ettladm/bin:/opt/fc/bin:/opt/fcms/bin:/opt/upgrade/bin:/opt/pd/bin:/usr/bin/
X11:/usr/contrib/bin/X11:/opt/hparray/bin:/opt/resmon/bin:/opt/pred/bin:/opt
/java1.2/bin:/opt/networker/bin:/opt/perf/bin:/opt/ignite/bin:/opt/hpnp//bin
:/opt/graphics/common/bin:/opt/java1.2/bin:/sbin:/home/root:/usr/symcli/bin:
/usr/emc/ESN_Manager:/usr/emc/FibreZone/bin:/usr/local/bin:/home/saroot/bin:
/opt/perf/bin:/usr/symcli/bin:/usr/symcli64/bin/
I seem to recall seeing some trick with:
Either
- awk
awk -F":"
awk {RS=":"; print $....
Or
- IFS
IFS=":" echo $PATH...
Where you could break up your $PATH into "separate" variables and sort/edit
them, and then put them back together.
Can anybody help me here?
Stuart
Stuart Abramson | Off: 412/825-1434 | Cell: 412/417-1567 | email:
sabramson@wabtec.com
***** CONFIDENTIALITY NOTE *****
The content contained in this e-mail transmission is legally privileged and confidential information intended only for the use of the individual or entity named herein. If the reader of this transmission is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this transmission is strictly prohibited.
-- ---> Please post QUESTIONS and SUMMARIES only!! <--- To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl Name: hpux-admin@dutchworks.nl Owner: owner-hpux-admin@dutchworks.nl Archives: ftp.dutchworks.nl:/pub/digests/hpux-admin (FTP, browse only) http://www.dutchworks.nl/htbin/hpsysadmin (Web, browse & search)
This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:37 EDT