Name of the Shell or Script

$BASH_ARGV0 expands to the name of the current shell or script. Values assigned to it also apply to $0.

Examples

Override $BASH_ARGV0 and $0 :

1
2
BASH_ARGV0=/bin/bash
echo $BASH_ARGV0 $0

Output: /bin/bash /bin/bash

BashSupport Pro 是一个 支持 $BASH_ARGV0 的 Bash 集成开发工具 – 马上试用!
© 2020–2022 Joachim Ansorg
声明
隐私政策
许可条款