zsh-users
 help / color / mirror / code / Atom feed
* replacing a textual part of all parameters in a cmd line
@ 2011-10-15  6:24 meino.cramer
  2011-10-15  6:56 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: meino.cramer @ 2011-10-15  6:24 UTC (permalink / raw)
  To: zsh-users

Hi,

A part of my command history shows this line:

    30007  feh ddd023afront.png ddd022afront.png ddd021afront.png ddd020afront.png ddd018afront.png

from I which to derive a line liek this

    feh ddd023aside1.png ddd022aside1.png ddd021aside1.png ddd020aside1.png ddd018aside1.png

To do so I tried

    !30007:s/front/side1/

which gave me

    feh ddd023aside1.png ddd022afront.png ddd021afront.png ddd020afront.png ddd018afront.png

(only the first parameter was changed).

Then I tried


    !30007:s/front/side1/g

which gaves me the same result as above.

What is the correct command to change all parameters of the command
line as described above?

Thank you very much for any help in advance!

Have a nice weekend!
Best regards,
mcc



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: replacing a textual part of all parameters in a cmd line
  2011-10-15  6:24 replacing a textual part of all parameters in a cmd line meino.cramer
@ 2011-10-15  6:56 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2011-10-15  6:56 UTC (permalink / raw)
  To: zsh-users

On Oct 15,  8:24am, meino.cramer@gmx.de wrote:
}
}     !30007:s/front/side1/g
} 
} which gaves me the same result as above.

Actually if you looked closely I think you'd find that it gave
you the result as before except with a "g" added at the end.

} What is the correct command to change all parameters of the command
} line as described above?

You put the g at the front.

    !30007:gs/front/side1/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-15  6:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-15  6:24 replacing a textual part of all parameters in a cmd line meino.cramer
2011-10-15  6:56 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).