Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我做...
ls$IFS-l
...我得到了我期望的输出。
curl$IFShttp://www.google.com
... 我不。
我误解了内部字段分隔符吗?如何在不使用任何空格字符的情况下运行 curl 命令?
您需要将变量放在大括号内,否则 shell 会查找名为“IFShttp...”的变量:
curl${IFS}http://www.google.com