home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!husc6!spdcc!ima!necntc!ncoast!allbery
- From: boris@Sun.COM (Philip Saeli - Sun Tactical Engineering)
- Newsgroups: comp.sources.misc
- Subject: v03i085: Re: v03i081: a csh alias to print out the path with reference numbers
- Summary: A faster way (at least on Suns)
- Message-ID: <60231@sun.uucp>
- Date: 18 Jul 88 02:30:20 GMT
- Sender: allbery@ncoast.UUCP
- Reply-To: boris@Sun.COM (Philip Saeli - Sun Tactical Engineering)
- Organization: Sun Microsystems, Mountain View
- Lines: 18
- Approved: allbery@ncoast.UUCP
-
- Posting-number: Volume 3, Issue 85
- Submitted-by: "Philip Saeli - Sun Tactical Engineering" <boris@Sun.COM>
- Archive-name: epf
-
- Hmmmm, I tried this alias and it executes relatively slowly on my workstation
- (a Sun 3/160 running SunOS 4.0). I have an alias I've been using for a
- while now that runs much faster, even though it forks an external command.
- I've called it "epf" for "echo path formatted". Kind of baroque, but
- it went with other aliases that I have. Here it is:
-
- alias epf \
- echo \$path \| "awk '{for(i=1; i<=NF; i++) printf" '"%3d: %s\n", i-1, $i}'"'"
-
- Speed is important to me as I have about 30 directories in my path.
-
-
- Philip Saeli Sun Microsystems, Inc.
- sun!psaeli psaeli@sun.com
-