You are not logged in.
Pages: 1
hello,
is there possibility to export global(local) variables with spaces between names?
now my shell only export first part of variable, to space
regards
Last edited by falomir (2009-08-18 04:33:00)
Offline
export FOO="lol this has spaces" ?
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
Offline
Mr.Elendig
ALBUM=$(cat /home/qaov/cnk | grep Album | cut -c 8-)
that`s my variable, inside sh script
adding "" won`t help...
maybe i must replace spaces with special variable like these from djszapi`s post ?
' ' => '\ '
Last edited by falomir (2009-08-17 07:47:46)
Offline
Try
ALBUM="$(cat /home/qaov/cnk | grep Album | cut -c 8-)"
The whole expression was quoted
.]
Last edited by alterecco (2009-08-17 10:44:44)
Offline
--> zsh
--> export test=$(echo one two three)
--> echo $test
one
--> export test="$(echo one two three)"
--> echo $test
one two three
--> bash
--> export test=$(echo one two three)
--> echo $test
one two three
--> exit
A bug maybe?
var=$(..) should work without quotes
--> test=$(echo one two three)
--> export test
--> echo $test
one two three
Offline
maybe a bug...
that would do the job, i`ll test it at home
thanks for advice
Offline
Unrelated, but there's a useless cat in there:
cat /home/qaov/cnk | grep Album
is the same as
grep Album /home/qaov/cnk
Edit: spelling
Last edited by Trent (2009-08-17 12:23:51)
Offline
It isn't necessarily a bug. Some zsh options change how it handles quotes, variables, etc.
(lambda ())
Offline
--> export test="$(echo one two three)"
that works fine Procyon
and i also put Trent advice in use
now i can go further
Offline
Pages: 1