About 792,000 results
Open links in new tab
  1. What is the meaning of IFS=$'\\n' in bash scripting?

    Feb 15, 2015 · At the beginning of a bash shell script is the following line: IFS=$'\\n' What is the meaning behind this collection of symbols?

  2. shell - Understanding IFS - Unix & Linux Stack Exchange

    The following few threads on this site and StackOverflow were helpful for understanding how IFS works: What is IFS in context of for looping? How to loop over the lines of a file Bash, read line …

  3. What is the "IFS" variable? - Unix & Linux Stack Exchange

    Feb 20, 2023 · I was reading this Q&A: How to loop over the lines of a file? What is the IFS variable? And what is its usage in the context of for-loops?

  4. Why is `while IFS= read` used so often, instead of `IFS=; while read..`?

    The IFS= read -r line sets the environment variable IFS (to an empty value) specifically for the execution of read. This is an instance of the general simple command syntax: a (possibly …

  5. Understanding "IFS= read -r line" - Unix & Linux Stack Exchange

    Jun 12, 2015 · Using IFS= LC_ALL=C read -r line works around it there. Using var=value cmd syntax makes sure IFS / LC_ALL are only set differently for the duration of that cmd command. …

  6. '\n' in `IFS=$'\n' is a variable? - Unix & Linux Stack Exchange

    Oct 26, 2018 · You can however use: eval "$(printf 'IFS="\n"')" Which works because the output of printf ends in a " character, not a newline. Now, for completeness, in the rc shell and …

  7. bash - Can IFS (Internal Field Separator) function as a single ...

    Parsing an array using IFS with non-whites space values creates empty elements. Even using tr -s to shrink multiple delims to a single delim isn't enough. An example may explain the issue …

  8. understanding the default value of IFS - Unix & Linux Stack …

    Here if the expansion contains any IFS characters, then it split into different 'words' before the command is processed. Effectively this means that these characters split the substituted text …

  9. How to send a command with arguments without spaces?

    Mar 15, 2017 · Or more generally, contains a space. cat${IFS}file.txt The default value of IFS is space, tab, newline. All of these characters are whitespace. If you need a single space, you …

  10. How to output comma separated values using IFS="," in shell

    I have a small script, which does not give comma separated output when IFS is used, but IFS is mandatory as i need it to read many other value. The output of the below script is odi_server1 …