rantapaa@cs.umn.edu (Erik E. Rantapaa) (09/06/90)
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@cs.umn.edugorpong@encore.kent.edu (Gordon C. Galligher) (09/07/90)
In article <1990Sep6.030354.27810@cs.umn.edu> rantapaa@cs.umn.edu (Erik E. Rantapaa) writes: >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/:/ / Try: set today = (`date | tr ':' ' '`) -- Gordon.