Try this:
$ echo oneone
oneone
$ !!:gs/one/two/ # Repeats last command; substitutes 'one' --> 'two'.
twotwo
More Related Contents:
- Are shell scripts sensitive to encoding and line endings?
- Difference between sh and Bash
- Command not found error in Bash variable assignment
- Pass commands as input to another command (su, ssh, sh, etc)
- Why would a correct shell script give a wrapped/truncated/corrupted error message? [duplicate]
- Why is testing “$?” to see if a command succeeded or not, an anti-pattern?
- What is the difference between $(command) and `command` in shell programming?
- Reading quoted/escaped arguments correctly from a string
- How can I remove the extension of a filename in a shell script?
- I just assigned a variable, but echo $variable shows something else
- How can I declare and use Boolean variables in a shell script?
- How do I run a shell script without using “sh” or “bash” commands?
- Ubuntu says “bash: ./program Permission denied” [closed]
- Assignment of variables with space after the (=) sign?
- How to echo shell commands as they are executed
- How to get a password from a shell script without echoing
- Count occurrences of a char in a string using Bash
- How to redirect output of an entire shell script within the script itself?
- How does Ctrl-C terminate a child process?
- source command not found in sh shell
- What does it mean in shell when we put a command inside dollar sign and parentheses: $(command)
- Should I use a Shebang with Bash scripts?
- Is there an elegant way to store and evaluate return values in bash scripts?
- Why would I create an alias which creates a function?
- What is the purpose of “&&” in a shell command?
- printf in bash: “09” and “08” are invalid numbers, “07” and “06” are fine
- How do I pause my shell script for a second before continuing?
- How do you echo a 4-digit Unicode character in Bash?
- Bash shell Decimal to Binary base 2 conversion
- How to substitute quoted, multi-word strings as arguments?