unix - sql output as a list in ksh -
i have script sql output of function multiple rows (one column) , i'm trying loop through loop function can't seem work...
rslt=sqlquery {} echo $rslt 1 2 3 4 in $rslt echo "lvl$i" done but loop...i maintain getting 4 times
lvl1 2 3 4 where want back...
lvl1 lvl2 lvl3 lvl4 how that?
to loop on values in ksh array, need utilize ${array[@]} syntax:
$ set -a rslt 1 2 3 4 $ in ${rslt[@]} > > echo "lvl$i" > done lvl1 lvl2 lvl3 lvl4 unix ksh
No comments:
Post a Comment