Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: s/pattern/pattern/g on the commandline ?



Hi,

2012/2/25  <meino.cramer@xxxxxx>:
> suppose I have very long and ugly commandline like this one:
>
>    cat file\ from\ \#windows \ part1 \a.txt file\ from\ \#windows \ part2 \a.txt file\ from\ \#windows \ part3 \a.txt file\ from\ \#windows \ part4 \a.txt > allAbout_a.txt
>
>
> and after summiting this ugly line I want redo the same but with a
> slightly differen input like this:
>
>
>    cat file\ from\ \#windows \ part1 \b.txt file\ from\ \#windows \ part2 \b.txt file\ from\ \#windows \ part3 \b.txt file\ from\ \#windows \ part4 \b.txt > allAbout_b.txt
>
>
> which is - by the way - simply done with vim, with which I am editing
> this posting currently.
>
> My question is:
> Is there any way to submit commands like 's/<searched>/<replacement>/g' for being applied the whole commandline in one go?

!!:gs/<searched>/<replacement>/

Best regards,

-- 
Jérémie



Messages sorted by: Reverse Date, Date, Thread, Author