Quote:
Originally posted by EZEE!
Damian Ibbotson, thanks, that is why you are a guru.
For us wannabies..Can you expand a litlle on what IFS=# is declaring...
Muchos Grazias
|
IFS (Internal Field Seperator) is an environment variable which is normally a space, a tab and a newline. The shell uses individual characters found in the IFS variable to separate fields (surprisingly enough!). IFS=# is simply setting the value of the variable to a # character.
You can see this in action if you try the following:
IFS=#; set Hello World; echo "$*"
If you only wanted to alter IFS for the cat command, you would do...
for i in $(IFS=# cat outfile); do
PS - I'm really not a 'guru'. I think you can interpret that as meaning 'prolific poster' and not much else!