2

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?

Chris
  • 1,501
  • 17
  • 32

1 Answers1

6

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

curl${IFS}http://www.google.com
perreal
  • 94,503
  • 21
  • 155
  • 181
  • Doesn't seem to work: Could not resolve host: http; nodename nor servname provided, or not known – Chris Sep 02 '12 at 11:32
  • 2
    url=www.google.com;curl$IFS$url works too, if you're looking at getting rid of { and } – Chris Sep 02 '12 at 13:00