[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-bash] What is the usage of $_?
From: |
Peng Yu |
Subject: |
[Help-bash] What is the usage of $_? |
Date: |
Sat, 6 Aug 2016 21:30:03 -0500 |
Hi, man bash says the following. But I don't understand why this
variable is useful. Does anybody know what is the real use of this
variable? Thanks.
_ At shell startup, set to the absolute pathname used to invoke the
shell or shell script being executed as passed in the environment or
argument list. Subsequently, expands to the last argument to the
previous command, after expansion. Also set to the full path- name
used to invoke each command executed and placed in the environment
exported to that command. When checking mail, this parameter holds the
name of the mail file currently being checked.
--
Regards,
Peng
- [Help-bash] What is the usage of $_?,
Peng Yu <=