![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help concatenation string and variable | drain | Shell Programming and Scripting | 5 | 02-18-2008 10:21 AM |
| cannot get logic for concatenation awk | user_prady | Shell Programming and Scripting | 7 | 12-10-2007 03:09 AM |
| Concatenation | Asteroid | Shell Programming and Scripting | 11 | 04-04-2007 07:15 AM |
| string concatenation | systemsb | UNIX for Dummies Questions & Answers | 7 | 04-04-2006 01:03 PM |
| Concatenation | videsh77 | Shell Programming and Scripting | 2 | 12-14-2004 06:13 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|