Re: split string in sh



Janis wrote:

Not quite.
[cut]
$ eval "`cat configFile.cfg`"
$ echo $option1
value1
$ echo $option2
value2

Correct. I forgot to add the double quotes to preserve format (and I do know
that they are needed).

/me needs a coffee.

Thanks!

.



Relevant Pages

  • Re: its not the school home work
    ... I've learned a bit about strong quotes and think I realized when to ... the shell (such as in the $var, but also for the spaces (that ... echo "foo bar" ... you may say that $string does not appear in /list/ context so ...
    (comp.unix.shell)
  • Re: heredoc and array problems
    ... You need to look up Interpolation. ... When you echo an array variable such as $Din SINGLE QUOTES ...
    (comp.lang.php)
  • Re: Fascinating problem with bash
    ... will result in OTHER_VAR being unset at the completion of the loop. ... subshell exits and any vars it sets will go away with it. ... The author uses double quotes for the subshell, ... first echo, to force variable substitution to happen when the loop is ...
    (Debian-User)
  • Re: Yet another "stop the bash quoting" post
    ... |> Output from running the file1.sh command is: ... |> the argument doesn't contain those single quotes; ... | By using set -x in the bash script and running /command/ without the ...
    (comp.os.linux.misc)
  • Re: Yet another "stop the bash quoting" post
    ... |> Output from running the file1.sh command is: ... |> the argument doesn't contain those single quotes; ... | By using set -x in the bash script and running /command/ without the ...
    (comp.unix.shell)