Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2005
    Posts
    92

    Unanswered: 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

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •