bash – refer the first parameter from last command quickly
To refer to first parameter from the last command quickly, you can use
!^
Note: This can also be referred as “!!:1“
To refer to first parameter from the last command quickly, you can use
!^
Note: This can also be referred as “!!:1“
In bash you can use
!#
to refer to any parameter from the current command, example:
mv ak amit.!#:1.txt ls amit.ak.txt