小编scd*_*dmb的帖子

First argument of bash is different when parameter is passed or not

There are two bash usages:

$ bash -c 'echo $0'
bash

$bash -c 'echo $0' "text"
text
Run Code Online (Sandbox Code Playgroud)

Why in the first case parameter $0 holds the program name but in second the first parameter?

bash

2
推荐指数
1
解决办法
864
查看次数

标签 统计

bash ×1