![]() |
|
|
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 |
| Spliting file based on condition | Raamc | Shell Programming and Scripting | 2 | 05-15-2008 12:51 PM |
| Help on Spliting files - urgent | rajee | Shell Programming and Scripting | 8 | 03-10-2008 01:01 PM |
| Spliting the line based on position. | senthil_is | Shell Programming and Scripting | 1 | 09-26-2007 02:32 AM |
| spliting up a huge file | grinder182533 | UNIX for Dummies Questions & Answers | 2 | 11-10-2006 09:43 AM |
| spliting up sentences | stevox | UNIX for Dummies Questions & Answers | 2 | 04-17-2001 04:36 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hi,
I am reading two values from oracle to unix variable and spliting them using the read command as follows, get_details=`sqlplus -s $sld_user/$sld_password@$sld_string<<EOF whenever sqlerror exit 1 whenever oserror exit 1 set feedback off set heading off set pagesize 0 set echo off set verify off select one_value||'-'||second_value from test_table where processed_flag = 'N' and error_flag = 'N' and rownum < 2; exit EOF` echo $get_details IFS=- read get_upload_id get_sold_to<<X $get_details X echo $one_value echo $second_value Now this script is woking but when i try it another way as bellow, get_details=`sqlplus -s $sld_user/$sld_password@$sld_string<<EOF whenever sqlerror exit 1 whenever oserror exit 1 set feedback off set heading off set pagesize 0 set echo off set verify off select upload_id||'-'||sold_to_distr_code from st_file_load_splitter where processed_flag = 'N' and error_flag = 'N' and rownum < 2; exit EOF` echo $get_details if [ -z "$get_details" ]; then echo ' No rows selected from database' exit else echo 'now spliting the string' IFS=- read one_value second_value<<X $get_details X echo $one_value echo $second_value fi then i am getting the error saying " syntax error at line XX: 'end of file' unexpected " can any one please help me what is wrong with the second script. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|