![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| problem with dd command or maybe AFS problem | Anta | Shell Programming and Scripting | 0 | 08-25-2006 07:10 AM |
| SSH Problem auth problem | budrito | UNIX for Advanced & Expert Users | 1 | 03-17-2004 07:12 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
what is problem in this sed ?????
hi champs,
i have created dynamic insert statements , but sed throwing me an error if i do have a blank character inside it..... my actual string HTML Code:
insert_config="INSERT INTO CBF_XXXX ( CS_ID, CS_NAME, FIELD_SEP, REC_SEP, FIELDS_NUM, FTPS_FILE, \ > DECSN_FMT_TYPE, DECSN_FIELDS, DECSN_SCHDL_TYPE, DECSN_SCHDL, DECSN_TIME, \ > DECSN_UNITWS, UNIQ_FILE_CONVNS, OUTBOX_RETN, UPDATE_TIME ) VALUES action_list ;" HTML Code:
echo ${insert_config_str}
('CSPAT191','CSXXXO,NENINETYONENL','|','" "','15','Y','ALL','NULL','DAILY','NULL','13:00','N','N','1',SYSDATE)
HTML Code:
insert_config_act=`echo $insert_config | sed -e 's/action_list/'${insert_config_str}'/g' `
but not able to trace out.......why ??? if in the insert_config_str if i am going to fill some value at 4th position, hen sed working fine...but here 4th column in blank,, it's throwing me error.... but i need to insert the blank character in that column.....can any one help me out to figure out the problem ???? Last edited by manas_ranjan; 12-07-2007 at 04:18 AM. |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
solved
i have to use
HTML Code:
insert_config_act=`echo $insert_config | sed -e "s/action_list/${insert_config_str}/g" `
|
||||
| Google The UNIX and Linux Forums |