|
String concatenation issue in ksh
Hello All,
I'm tryying to concatenate string and variables value in ksh, but i'm unable to do it, can someone please help in rectifying my error,
here is the code i have written,
#!/usr/bin/ksh -x
cat $1 | while read fileline
do
val1= echo $fileline | awk -F, '{print $1}'
val2= echo $fileline | awk -F, '{print $2}'
set sqlstmt = "update Tablename set Varnum1 = $val2 where Date = '$val1' and UId = 1"
#echo $fileline
echo $sqlstmt
#echo $val1
#echo $val2
done
Data there in input file is something like ,
20080401,16540448,52267816,2559665,8088541
20080402,16599900,52455684,2741819,8664148
Any help will be much appriciated, as i have been trying various combination from last few hours like putting the variable name in {} , i.e ${val2}, etc
Thanks,
Arvind.
|