Page 1 of 1
AUTHOR
Any korn shell experts here
doubt it.
can i name a variable based on something else...like
if [[ i="abc" >>
then
$i_abc=5
elif [[ i="def>>
then
$i_abc=6
fi
so then i should be able to see def_abc as 6
if [[ i="abc" >>
then
$i_abc=5
elif [[ i="def>>
then
$i_abc=6
fi
so then i should be able to see def_abc as 6
lunitik quote:i use ibm stuff and i used to work for them, its the preferred shell bub
Expert enough to know to avoid it...
zsh >
lunitik quote:its a quick example, i have a while statement that runs through a list of servers, i need to create a unique variable for each one.
that just looks wrong... for instance, you define i twice - although second has a typo so wouldn't work...
should output abc_abc as 5 and def_abc as 6 though I guess?
seems utterly pointless, but ok
this isn't a korn script though, its just a shell script
lunitik quote:where did i define i twice bro?
that just looks wrong... for instance, you define i twice - although second has a typo so wouldn't work...
should output abc_abc as 5 and def_abc as 6 though I guess?
seems utterly pointless, but ok
this isn't a korn script though, its just a shell script
lunitik quote:if i=abc
that just looks wrong... for instance, you define i twice - although second has a typo so wouldn't work...
should output abc_abc as 5 and def_abc as 6 though I guess?
seems utterly pointless, but ok
this isn't a korn script though, its just a shell script
else if i=blah
you dumb?
lunitik quote:i need meth
nm, see what SPUTNIK said
lunitik quote:u tell me bub, thats why i posted the question, u fuck
$? is for creating unique variables I thought?
Page 1 of 1
Quick reply
Sign in to post a message.Times shown in Eastern Time (ET).
