If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > shell script errros

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-28-05, 10:29
pavan_test pavan_test is offline
Registered User
 
Join Date: Oct 2005
Posts: 45
shell script errros

#!/bin/ksh


sqlplus -s user/passwd@remoteserver << EOF > errors2.log

set pagesize 0 feedback off verify off heading off echo off

select directory_nm || '/' || file_nm || '|' ||venue_id || '|' || time_id from file_control;
EOF


The output of this script is;

/mnt/datagridx/MKG/perm/testdata/DSA.WLG.20050713211544.20051025.20050713211544|
28991|1130198400

/mnt/datagridx/MKG/perm/testdata/DSA.WLG.20050713211544.20051025.20050713211544|
25881|1130198400

/mnt/datagridx/MKG/perm/testdata/DSA.WLG.20050711210100.20051025.20050711210100|
25881|1130198400

/mnt/datagridx/MKG/perm/testdata/DSA.WLG.20050711210100.20051025.20050711210100|
28991|1130198400


The desired output is:
the directory_nm, filename,venueid and timeid must be in the same line.

/mnt/datagridx/MKG/perm/testdata/DSA.WLG.20050713211544.20051025.20050713211544|289 91|1130198400
/mnt/datagridx/MKG/perm/testdata/DSA.WLG.20050713211544.20051025.20050713211544|258 81|1130198400
/mnt/datagridx/MKG/perm/testdata/DSA.WLG.20050711210100.20051025.20050711210100|258 81|1130198400
/mnt/datagridx/MKG/perm/testdata/DSA.WLG.20050711210100.20051025.200507112101002899 1|1130198400

Can you tell me why the output from the korn script is printing in 2 lines instead of single line. I tried to debug it could not.

can anyone hep me please.

Thanks
Reply With Quote
  #2 (permalink)  
Old 10-28-05, 13:44
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,454
If you posted your question in the Oracle forum where it belongs somebody would definitely have pointed out that you need to "set linesize 200" to instruct sqlplus not to wrap output after 80 characters.

Here, I don't think anybody can help you since your question doesn't have anything to do with UNIX shells.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On