Skip to main content

Multiple substitution when repeating the previous command [Resolved]

I know that I can simply substitute a string with another in the previous command by typing:

!!:gs/string1/string2/

But how I can perform multiple substitutions, e.g. having a command:

echo "AAAAAAAAAAAAAAAAA" > test1

I want to substitute A with B and 1 with 2, so execute such a command:

echo "BBBBBBBBBBBBBBBBB" > test2

How can I do it with !! operator?


Question Credit: K. Koovalsky
Question Reference
Asked July 11, 2018
Posted Under: Unix Linux
19 views
1 Answers

Your Answer
D:\Adnan\Candoerz\CandoProject\vQA