Shell String Containing Spaces is Not Splitting on the Spaces

This page answers questions like these:

Shell String Containing Spaces is Not Splitting on the Space:

Have you altered the IFS environment variable? If so, string arguments to programs and shell scripts may not split as expected. If you do need to alter the IFS environment variable, you should change it back straight afterwards. For example:

OFS="$IFS" # Keep backup of IFS. IFS=":" # Alter IFS temporarily. Do something. IFS="$OFS" # Restore backup of IFS.

Related Links:
Embed Quotes in a Shell Command or String
Shell Alias Taking Multiple Arguments

Home  >  Linux / Unix  >  Shell String Containing Spaces is Not Splitting on the Spaces


Tags: shell string, containing spaces, not splitting, not breaking, shell, command, linux, unix

Src: shell-string-containing-spaces-not-breaking.txt
Dst: Linux-Unix/shell-string-containing-spaces-not-splitting.htm
Ads: 2