Article View: comp.unix.shell
Article #1075Why does !!:gs/:/ / change only one colon?
From: Erik E. Rantapaa
Date: Thu, 06 Sep 1990 03:03
Date: Thu, 06 Sep 1990 03:03
18 lines
1051 bytes
1051 bytes
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.edu
Technical Details
Message-ID:
<1990Sep6.030354.27810@cs.umn.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!uc!cs.umn.edu!rantapaaShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!uc!cs.umn.edu!rantapaa From: rantapaa@cs.umn.edu (Erik E. Rantapaa) Newsgroups: comp.unix.shell Subject: Why does !!:gs/:/ / change only one colon? Summary: tcsh bug? Keywords: tcsh, csh, getting commands into the history list Message-ID: <1990Sep6.030354.27810@cs.umn.edu> Date: 6 Sep 90 03:03:54 GMT Distribution: na Organization: University of Minnesota, Minneapolis - CSCI Dept. Lines: 18