LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] zsh and useless uses of cat...

[ILUG] zsh and useless uses of cat...

kevin lyda kevin at suberic.net
Tue Mar 20 12:10:08 GMT 2001


ok, started on zsh this weekend (more free time and all that, natch).
features i've likes so far:

i think recently redhat has started putting /bin in the path prior to
/usr/bin.  this is annoying since it hides /usr/bin/vi from /bin/vi.
so i do this:

    typeset -U path               # makes sure all elements are unique
    for f in $path; do
	if [[ $f != /bin ]]; then
	    tmp=($tmp $f)
	fi
    done
    path=($tmp /bin)
    unset tmp

this puts /bin at the end.  where it belongs in my opinon.  any zsh
wizards know a better way?

prompts are always fun.  this gives user at host(time or ding on the hour)%
on the left hand side, the current dir on the right.

    PS1='%n@%m(%(t.Ding.%D{%l:%M%P}))%# '
    RPS1='%B[%~]%b'

lastly there's the multios option.  ah.  so instead of this:

    cat foo bar | some.cmd
    grep foo bar | tee foo.in.bar | less

you can do:

    some.cmd < foo < bar
    grep foo bar > foo.in.bar | less

and finally there's autocd.  instead of cd .. , you can just do .. .

kevin, typing just that little bit less...

-- 
kevin at suberic.net          i...  i have a dream.  and that dream is:
fork()'ed on 37058400      use DIY::Tiler;
meatspace place: work      my($t) = new DIY::Tiler;
http://suberic.net/~kevin  $t->tile(-room => "en-suite", -style => "stone");




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell