Shell String Containing Spaces Is Not Splitting On The Spaces

This page answers questions like these:


Related Links:
Bash String Manipulation
Embed Quotes in a Shell Command or String
Shell (Bash/Bourne/Korn) Alias Taking Multiple Arguments



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:
Bash String Manipulation
Embed Quotes in a Shell Command or String
Shell (Bash/Bourne/Korn) 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, solaris, bsd, aix

Copyright © HelpDoco.com
shell-string-containing-spaces-not-breaking.txt
Linux-Unix/shell-string-containing-spaces-not-splitting.htm
1