$touch file{1,2}
$echo "file1" >> file1
$^1^2
=>echo "file2">>file1
But I wanted it to be
echo "file2">>file2
How to do more than one substitution ?
!!:gs/1/2
should do it. ^1^2
is a shortcut for !!:s/1/2
, and you just need to supply the g
flag.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments