Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!accuvax.nwu.edu!nucsrl!naim From: naim@eecs.nwu.edu (Naim Abdullah) Newsgroups: comp.unix.questions Subject: Need csh alias to match patterns in history Message-ID: <3680046@eecs.nwu.edu> Date: 24 Mar 89 02:46:14 GMT Organization: Northwestern U, Evanston IL, USA Lines: 24 A friend of mine wants a csh alias that will print all lines in the history list that match a pattern if one is supplied, otherwise just print the history. He asked me and I suggested the following csh alias: alias h ' \ if ( "X\!*" == "X" ) then \ history \ else \ history | grep \!* \ endif' For some reason, this does not work. Can some kind soul explain why and supply a working answer to this problem ? Thanks. Naim Abdullah Dept. of EECS, Northwestern University Internet: naim@eecs.nwu.edu Uucp: {oddjob, chinet, att}!nucsrl!naim