Find the answer to your Linux question:
Results 1 to 2 of 2
Guys (and girls) I have 2 monitoring Linux shell scripts. The subscript fails with: Code: [oraclesource scripts]$ ./ggs.ksh ./ggs.ksh[12]: syntax error: `> ' unexpected Here is the script: Code: #!/bin/ksh ...
  1. #1
    Just Joined!
    Join Date
    Oct 2011
    Posts
    1

    Help with Linux shell script

    Guys (and girls) I have 2 monitoring Linux shell scripts.
    The subscript fails with:

    Code:
    [oraclesource scripts]$ ./ggs.ksh
    ./ggs.ksh[12]: syntax error: `> ' unexpected
    Here is the script:

    Code:
    #!/bin/ksh
    #########################################
    #Name: ggs.ksh #
    #THIS SCRIPT WILL CALLED BY ggs_lag.ksh #
    #########################################
    #alias gate='clear;cd $GGATE;./ggsci'
    echo "ggsksh started `date`" >> /tmp/ggs_check.log
    export GGATE=/u01/gg
    alias gate='clear;cd $GGATE;ggsci'
    export PATH=/u01/gg:/u01/app/oracle/product/11.2.0/db_1/bin:/usr/sbin:$ PATH
    cd $GGATE
    /u01/gg/ggsci <<>
    info all
    exit
    EOF
    echo "ggsksh completed at `date` " >> /tmp/ggs_check.log
    #End of script
    The problem is with this line: /u01/gg/ggsci <<>
    It is supposed to connect to ggsci API, then run “info all” within the program, then exit.
    But it throws the error “syntax error: `> ' unexpected “
    Thanks for your help.
    Last edited by MikeTbob; 10-29-2011 at 10:46 AM. Reason: Added Code Tags

  2. #2
    Just Joined!
    Join Date
    Oct 2011
    Posts
    50
    Replace:
    /u01/gg/ggsci <<>
    with:
    /u01/gg/ggsci <<EOF

    I hope this helps

Posting Permissions

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