[HPADM] Breaking up my $PATH into separate lines

From: Abramson, Stuart (SAbramson_at_Wabtec.com)
Date: 12/02/03

  • Next message: Abramson, Stuart: "[HPADM] Summary: Breaking up my $PATH into separate lines"
    To: "Hpux-Admin (hpux-admin@dutchworks.nl)" <hpux-admin@dutchworks.nl>
    Date: Tue, 2 Dec 2003 10:13:43 -0500 
    
    

    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)
    

  • Next message: Abramson, Stuart: "[HPADM] Summary: Breaking up my $PATH into separate lines"

    Relevant Pages

    • Re: [SLE] Time synch problem
      ... Yes, it is a nice trick to separate words, easier and better than the ...
      (SuSE)
    • Re: make env with portupgrade
      ... When I want to upgrade it, this does the trick: ... Try to include every argument in '' and separate them with commas, ...
      (comp.unix.bsd.freebsd.misc)
    • Re: Add separator to All Programs menu?
      ... > Way kewl, Ron. ... Right after IE4x was released we used this trick to separate different ...
      (microsoft.public.windowsxp.customize)
    • Re: Anti rail protest gathers pace
      ... not only new roads that people object to it seems... ... trick that one. ... Not if each of them can raise an objection on two separate points. ...
      (uk.transport)
    • Re: howto /dev/null NDRs to not existing mailbox
      ... Szaba wrote: ... need to do each of the options Marc outlined below or are they separate ... options any one of which would do the trick? ... Use the one that fits your needs best. ...
      (comp.mail.sendmail)