Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!encore!necis!adamm From: adamm@necis.UUCP (Adam Moskowitz) Newsgroups: comp.unix.questions Subject: Csh help needed (specfically, if's and regexp's) Message-ID: <1047@necis.UUCP> Date: 17 May 89 18:19:31 GMT Distribution: usa Organization: NEC Information Systems, Boxborough, MA Lines: 19 [I've just washed my brain and I can't do a thing with it :-)] I've tried RTFM, but it didn't help. I need to know how to use a regular expression inside a csh if statement. For example, I want to compare the output of the `tty` command to "*/ttyp[0-9][0-9]*" and do things based on whether it matches or not (i.e. I do different things when I come in over the net). I've tried all the combinations I can think of, but no luck. Please help. Send examples, suggestions, magical incantations, chocolate chip cookies, whatever. Send it via email to ...!harvard!necntc!necis!adamm or adamm@necis.nec.com. But DON'T send me mail telling me to use a different shell! I like the csh, and I need to do this inside my .login, so sh won't help. Thanx, and I'll summarize if people want me to. -- Adam S. Moskowitz ...!(backbone)!{necntc,encore}!necis!adamm "To err is human; to forgive is simply not our policy."