meowmeow
meowmeow

Reputation: 159

Why doea $IFS act as a whitespace in the command "ls$ISF-l" but not "Echo hello"?

ls -l has the same output as ls$ISF-l, but echo$IFShello does not have the same output as echo hello.

I'm aware that $IFS by default is equal to white space. I'm just wondering why $IFS is behaving differently in between these two scenario.

Peace.

Upvotes: 0

Views: 99

Answers (1)

Mr. Flori
Mr. Flori

Reputation: 36

In Case "echo$IFShello" there is no Variable with name "IFShello". You need "echo${IFS}hello" the get the same output as "echo hello"

Upvotes: 2

Related Questions