Using the internal field separator with curl

2019-07-30 19:06发布

问题:

When I do...

ls$IFS-l

... I get the output I expect.

When I do...

curl$IFShttp://www.google.com

... I don't.

Am I misunderstanding internal field separators? How could I run a curl command without using any space characters?

回答1:

You need to put the variable within curly brackets, otherwise the shell looks for a variable called "IFShttp...":

curl${IFS}http://www.google.com


标签: bash unix ifs