Shell String Containing Spaces Is Not Splitting On The Spaces
This page answers questions like these:
- Why is my shell string not breaking on spaces?
- Why is my shell string not splitting on spaces?
- Why is my shell string argument to a program not breaking on spaces?
- Why is my shell string argument to a program not splitting on spaces?
- Why is my shell string not splitting into multiple strings at spaces?
- Why is my shell argument not splitting into multiple arguments on spaces?
Related Links:
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:
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