Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!unisoft!peritek!dig From: dig@peritek.UUCP (Dave Gotwisner) Newsgroups: comp.unix.questions Subject: Re: C Shell history, backprimes Q's -- Noddy Level Message-ID: <627@peritek.UUCP> Date: 15 Apr 89 08:23:08 GMT References: <4930001@hpopd.HP.COM> Organization: Peritek Corp., Oakland, CA Lines: 35 In article <4930001@hpopd.HP.COM>, ian@hpopd.HP.COM (Ian Watson) writes: > OK, a simple one from a neophyte... > > I've just entered a command 'foo bar parm', when what I wanted was > 'foobar parm'. I've tried the history mechanism of the C Shell, but > it seems obsessed with treating the erroneous command as a sequence > of words, and so I can't seem to get the substitute to recognise > 'o b', as this spans words. The few Unix folks round here are all Korn > shell users. I refuse to change until I've sussed this one, as I'm too > pigheaded. I'm browned off with combos of '," and \ to quote that > damned space, what'm I doing wrong ? Is there any 'conceptual user > model' to the mechanism that'll give me an insight into how I might > tackle such stumbling blocks logically in future ? Try: !:0!* This will take argv[0] and concatinate it with argv[1], adding the other arguments afterwords. In otherwords, argv[0] == foo argv[1] == bar argv[2] == parm !:0 gives the 0'th arg !* gives 1 - N !:0!* gives "foobar parm" -- ------------------------------------------------------------------------------ Dave Gotwisner UUCP: ...!unisoft!peritek!dig Peritek Corporation ...!vsi1!peritek!dig 5550 Redwood Road Oakland, CA 94619 Phone: 1-415-531-6500