0

Hi IFS=' ' is for space, but what is

IFS='
'
3
  • @musefan hi are you telling me or asking me ? Commented Jul 14, 2015 at 13:35
  • I had a feeling you were going to say that... I am guessing, as it seems logical. I would have though you were in some sort of position to be able to validate that. By the definition of IFS surely it would mean that unescaped substitutions would be split into words using a newline rather than a space. You might want to consider modifying your question to include some context. Where have you seen it like this for example Commented Jul 14, 2015 at 13:45
  • i saw in internet today somewhere brother but cannot fin it again :( is there anything like that? Commented Jul 14, 2015 at 14:05

1 Answer 1

1

It means you are specifying the IFS to use newline for splitting. This would be similar to doing:

IFS=$'\n'

The difference being is that your way is POSIX compliant.

My sources for this answer are here and here

You may find that the different methods are preferred depending on which shell implementation you are using (I think that's the right term?)


NOTE: My answer is based purely on the last 10 minutes of research, I have no prior experience or knowledge with this.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.