differecnce between ${IFS} and "${IFS}"



The following two commands have different effect.

$ echo A${IFS}B
A B

$ echo "A${IFS}B"
A
B

It is obvious that the first one interprets `IFS' as
space, while the second interprets it as new line.
In fect, the `IFS' represents three characters, namely
space, tab, and new line. why different choices occur
in different situations?

--
ego cogito ergo sum
.



Relevant Pages

  • Re: differecnce between ${IFS} and "${IFS}"
    ... $ echo A$B ... It is obvious that the first one interprets `IFS' as ... In fect, the `IFS' represents three characters, namely ... what is the meaning of `normal shell operation'? ...
    (comp.unix.shell)
  • Re: differecnce between ${IFS} and "${IFS}"
    ... $ echo A$B ... It is obvious that the first one interprets `IFS' as ... while the second interprets it as new line. ... In fect, the `IFS' represents three characters, namely ...
    (comp.unix.shell)
  • Re: differecnce between ${IFS} and "${IFS}"
    ... mop2 wrote: ... $ echo A$B ... while the second interprets it as new line. ... In fect, the `IFS' represents three characters, namely ...
    (comp.unix.shell)
  • Re: differecnce between ${IFS} and "${IFS}"
    ... $ echo A$B ... while the second interprets it as new line. ... In fect, the `IFS' represents three characters, namely ...
    (comp.unix.shell)
  • Re: NEWBIE variable substitution
    ... you're not trying to list files that start with a ".". ... tail -3 | ... while IFS= read -r file; ... $ echo $file ...
    (comp.unix.shell)