^old^new -- any way to specify space in "old"?

^old^new -- any way to specify space in "old"?

Post by Paul DuBo » Sun, 11 Sep 1994 03:43:25



It's my impression that the csh/tcsh ^old^new history operator
does not allow the "old" string to contain spaces:

        % echo a b
        a b
        % ^a b^ab
        Modifier failed.

Is that a correct assumption, or is there a way to do it?  I've
made various escaping and quoting attempts, all of which failed.
--
Paul DuBois

 
 
 

^old^new -- any way to specify space in "old"?

Post by The Deckmeist » Mon, 12 Sep 1994 06:17:43



: It's my impression that the csh/tcsh ^old^new history operator
: does not allow the "old" string to contain spaces:

:       % echo a b
:       a b
:       % ^a b^ab
:       Modifier failed.

: Is that a correct assumption, or is there a way to do it?  I've
: made various escaping and quoting attempts, all of which failed.

I've done this:

% echo a b
a b
% ^a\ b^a\ c
echo a c
a c
%

So try escaping the spaces and see if yours works.

: --
: Paul DuBois

--
MP"""fL                 x,                     | Brandon Emerson (Decker)
M|   |M  .___    .___.  M| ._.   .___   _.._.  | Asst. Admin ETSU HPUX Systems

M|   |M MP""""' M|      MPv#,   MP""""' M|     | Get my semester schedule by
M|xxx/F YfxxxP' YfxxxP' M| 'v#, YfxxxP' M|     | fingering my email address.

 
 
 

1. "new" ksh on "old" hpux

we've got various hpux boxes scattered around the country running anything
from 9.01 to 9.05, all of which have the"old" ksh, namely a 1988 version.

i'm new to hpux and a recent convert from csh, but some of the cron
scripts i've inherited seem to have a syntax problem.  basically they say:

        if [ $ROOM -lt 5000 ]

which generates a "test: argument expected" from cron when it runs the
scripts.

as near as i can tell from the "new" 1993 ksh spec the syntax should be:

        if (( $ROOM < 5000 ))

but i'm not at all sure this would work on the hps w/the old ksh.

anybody have a clue on this, or better yet, some real live experience?
should i figure out the old syntax (which i suspect leaves out the square
brackets) and use that, or is it possible (albeit highly unlikely) that
our old ksh will correctly interpret the new ksh syntax.  i'm looking for
a relatively long-term solution as the gov't isn't likely to upgrade a
whole bunch of hp boxes to 10.0 (which presumabley has the new ksh) -
money's pretty tight.

--
HEY!

   - james brown

2. Difference between RH 6.2 and 7.2 - Windows Key default

3. how to tell if a mac is "new world " or "old world"

4. How Compile Kernel for AMD K6-2 ?

5. awk '{gsub("old","\n"); print}' adds additional new line

6. Kernel installation with lilo

7. Need to move "unix.old" to "unix"!!!

8. Out of inodes

9. X Windows and my old old old old video card

10. GETSERVBYNAME()????????????????????"""""""""""""

11. OLD PROBLEM: "You have new mail"

12. Compiled new kernel but old "module-info" file

13. """"""""My SoundBlast 16 pnp isn't up yet""""""""""""