linux - `-f` 标志在 shebang 中使用时是什么意思:`#!/bin/bash -f`?
问题描述
shebang -f 标志是什么意思?具体来说,它用于 bash 脚本文件,
#!/bin/bash -f
echo hello
# blabla
解决方案
它将-f
标志传递给bash
运行脚本的实例:
来自$ bash -c "help set"
:
-f Disable file name generation (globbing).
来自https://tldp.org/LDP/abs/html/options.html:
Abbreviation Name Effect
-f noglob Filename expansion (globbing) disabled
推荐阅读
- systemd - Salt 使用自定义服务文件启用 systemctl 服务
- python-3.x - 从字符串输入制作摘要数据框
- python-3.x - TypeError:必须是实数,而不是 InstrumentedAttribute
- angular - 在Angular中注销后使JWT令牌无效
- reactjs - 如何在按钮单击时显示子详细信息
- windows - DHCP 工具比 PowerShell 快得多
- java - 使用 Intellij 和 Inno Setup 构建本机 JavaFX 应用程序时,我应该将自定义 .iss 文件放在哪里?
- powershell - 将文件路径存储为变量
- r - 如何在条形图上标记条形以及如何在 R Studio 中更改轴标题?
- node.js - 如何在 Windows 上使用 nodemon 设置 NODE_ENV=production?