I wonder if it is possible to make chain actions in Ubuntu terminal like:
action 1 on objectA . then action 2 on objectA
without having to repeat the name of objectA anymore.
Example:
touch file.js && openEditor "$1"
or something like that.
Best Answer
With bash History Expansion, you can refer to the nth word of the current command line using
!#:n
e.g.