help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] What is the usage of $_?


From: Eduardo Bustamante
Subject: Re: [Help-bash] What is the usage of $_?
Date: Sun, 07 Aug 2016 15:00:48 +0000

I use it frequently to re-use the last argument of the previous command.

Something like:

touch /long/path/to/file
ls -l "$_"

In which case, the parameter will expand to the long and hard-to-type path.
I'm not sure if it's wise to use it in scripts though, I only use it
interactively.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]