Why does !!:gs/:/ / change only one colon?
Erik E. Rantapaa
rantapaa at cs.umn.edu
Thu Sep 6 13:03:54 AEST 1990
I want to substitute all the colons in a command line to, say, spaces in
/bin/tcsh. However,
!!:gs/:/ /
only changes the first colon. Is this a bug? Does anyone know how to get
around this? While I've got your attention, I should also ask if anyone
has a better way to do the following in tcsh:
echo "set today = (`date`)" > /tmp/.date
source -h /tmp/.date
!set:s/:/ /:s/:/ /
(note the kludge because the global sub doesn't work) but without calling
sed or writing a C program.
--
Erik Rantapaa
rantapaa at cs.umn.edu
More information about the Comp.unix.shell
mailing list