help with csh alias

Charles Shub cdash at boulder.Colorado.EDU
Wed Apr 12 05:22:04 AEST 1989


i want an alias (4.3bsd on a microvax, c shell) that will
strip a colon (:) out of the middle of an argument
i.e. 4:15 becomes 415. That's easy to do with echo piped through sed.
what is hard is that i want to use the result as an argument to
expr(1) and capture the output of expr. I'm having trouble with escape
sequences. The colon is, unfortunately, optional, or i could use the "s"
modification of the c shell. Any words of wisdom:

desired version
	mycommand `expr <nocolon> - 5` other args

charlie shub  cdash at boulder.Colorado.EDU  -or-  ..!{ncar|nbires}!boulder!cdash
  or even     cdash at colospgs (BITNET)



More information about the Comp.unix.questions mailing list