简体   繁体   English

`-f` 标志在 shebang 中使用时是什么意思:`#?/bin/bash -f`?

[英]What does `-f` flag mean when used in a shebang: `#!/bin/bash -f`?

what does shebang -f flag means? shebang -f 标志是什么意思? Specifically it is used in bash cript file,具体用于 bash 脚本文件,

#!/bin/bash -f
echo hello
# blabla 

It passes the -f flag to the bash instance which runs the script:它将-f标志传递给运行脚本的bash实例:

From $ bash -c "help set" :$ bash -c "help set"

 -f  Disable file name generation (globbing).

From https://tldp.org/LDP/abs/html/options.html :https://tldp.org/LDP/abs/html/options.html

Abbreviation    Name    Effect

-f              noglob  Filename expansion (globbing) disabled

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Shebang选项'#!/ bin / csh -f' - Shebang option ' #!/bin/csh -f ' bash 中使用的 -ex 选项有什么作用? #!/bin/bash -ex 意思是 - What does -ex option used in bash | #!/bin/bash -ex mean “错误:未知速记标志:'f' in -f5”从 Python 运行 bash 脚本时 - “Error: unknown shorthand flag: 'f' in -f5” when running bash script from Python 运行cron作业时-f在“php -f”中代表什么? - What does -f stand for in "php -f" when running a cron job? Linux 命令“ps”中的参数 -f 是什么意思? - What does parameter -f mean with Linux command 'ps'? awk脚本标题:#!/ bin / bash或#!/ bin / awk -f? - awk script header: #!/bin/bash or #!/bin/awk -f? 是什么导致“/ usr / bin / ld:-f可能在没有-shared的情况下不能使用”,我该如何解决它 - What causes “/usr/bin/ld: -f may not be used without -shared” and how do I fix it 使用echo时标志-e是什么意思 - What does the the flag -e mean when using echo 什么“#$”在bash中意味着什么? - What does “#$” mean in bash? bash shell脚本函数定义(例如“ f(){}”)中使用的括号是什么? 与使用“功能”关键字不同吗? - What are the parentheses used for in a bash shell script function definition like “f () {}”? Is it different than using the “function” keyword?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM