Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BASH IFS 环境变量用法总结 | LadyRick's idea #5

Open
utterances-bot opened this issue Dec 14, 2022 · 3 comments
Open

BASH IFS 环境变量用法总结 | LadyRick's idea #5

utterances-bot opened this issue Dec 14, 2022 · 3 comments

Comments

@utterances-bot
Copy link

BASH IFS 环境变量用法总结 | LadyRick's idea

之前从网上找了很多关于 IFS 的二手资料,每次用每次都得再看一遍,理解还是不够透彻。最近对照着 man bash ,终于把这个 IFS 搞清楚了。
IFS 的三种作用 IFS 其实只在 3 个地方发挥作用:
用于扩展带双引号的 "$*" 用于不带双引号的变量扩展 / 子命令扩展 / 算数扩展 用于在内建命令 read 中进行断词 可以看到,其实只有 bash 本身和 read 命

https://idea.ladyrick.com/posts/bash-ifs-%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E7%94%A8%E6%B3%95%E6%80%BB%E7%BB%93/

Copy link
Owner

测试评论

@ladyrick
Copy link
Owner

测试评论

测试回复

Copy link

Hijdk commented Nov 2, 2024

霍师傅 np

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants