bash refer parameters from the current command
2014-09-15
21 words
1 min read
In bash you can use
!#
to refer to any parameter from the current command, example:
mv ak amit.!#:1.txt ls amit.ak.txt
Related Articles:
- 2012/03/02 15 Linux Bash History Expansion Examples You Should Know
- 2011/05/16 Unix shell script for removing duplicate files
- 2011/01/05 Shell Scripting
- 2014/02/03 bash debug – log all executed commands
- 2013/11/22 bash – using the vi mode more effectively.
Authored By Amit Agarwal
Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.