Csh help needed (specfically, if's and regexp's)
Adam Moskowitz
adamm at necis.UUCP
Thu May 18 04:19:31 AEST 1989
[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 at 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."
More information about the Comp.unix.questions
mailing list