Gio Lodi 8/5/2015

How to reuse the last parameter in a terminal command

Read Original

This technical article details two Bash shell tricks for reusing the last argument from a previous command: the $_ variable and the !$ history expansion. It provides practical examples, such as using them with Git commands, and discusses their utility in scripting and with tools like xargs to improve command-line efficiency.

How to reuse the last parameter in a terminal command

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

1
The Beautiful Web
Jens Oliver Meiert 2 votes
3
LLM Use in the Python Source Code
Miguel Grinberg 1 votes
4
Wagon’s algorithm in Python
John D. Cook 1 votes