The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
cp script error, pls help in debugging!!!! wrapster UNIX for Advanced & Expert Users 1 05-24-2008 09:12 AM
which one method is best for debugging the shell script? psiva_arul UNIX for Advanced & Expert Users 2 05-20-2008 07:33 AM
debugging a script?? wrapster Shell Programming and Scripting 2 03-25-2008 11:07 AM
Nee help debugging script..plz gzs553 Shell Programming and Scripting 8 11-24-2006 11:21 AM
HP-UX Debugging Shell script shihabvk Shell Programming and Scripting 1 04-24-2006 10:55 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-08-2006
alfredo123 alfredo123 is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 44
FTP script debugging

Hello all,

I am trying to run a script and have not had much success running it...ne help debugging it will be appreciated..The ftp script alone works but not within the while loop.

below is the script


Code:
#!/usr/bin/ksh
destination_server=servename
destination_user_id=un
destination_password=pw

myfile=/dir1/xxx.dat
while true
 do
  if [[ -a $myfile ]]; then
    echo "$myfile exists!"
    ftp -v -n $destination_server <<END
     user $destination_user_id $destination_password
     cd dir3
     put $myfile
    END
    
    echo 'FTP Complete'
  else
    sleep 600
  fi
done

I am getting the error

0403-057 Syntax error at line 12 : `<' is not matched.
  #2 (permalink)  
Old 11-08-2006
alfredo123 alfredo123 is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 44
Okay works now:
For others who are looking for this--
0403-057 Syntax error at line nn : `<' is not matched.

This is returned when using <<EOF, << EOF, <<-EOF, <<! etc. and all of the
permutations of syntax that preceed/follow.

If you are also finding this is a problem, I have managed to get around this by
wrapping the sql in a process to returning a value e.g.

ORA_RC=`$ORACLE_HOME/bin/sqlplus /nolog <<EOF
connect /as sysdba
................
EOF`
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:49 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0