hi,
can someone debug this script? when i run it manually, line-by-line it seems to work, but running this script gives me "Failed to open file." "STRAIN" is numeric value (041505) that needs to be joined by 'RESULT.01' as an input file to get.
#!/bin/ksh
HOST='192.168.68.52'
USER='dba'
PASSWD='dbadmin'
SOURCE_DIR='/home/testing'
TARGET_DIR='/home/final'
FILE='echo | cat FILE2.log'
cp /dev/null FILE.log
cp /dev/null FILE2.log
echo | cat STRAIN >> FILE.log
echo 'RESULT.01' >> FILE.log
# sleep 2
sed '$!N;s/\n//' FILE.log >> FILE2.log
ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
cd $SOURCE_DIR
get $FILE
quit
END_SCRIPT
exit 0
can someone debug this script? when i run it manually, line-by-line it seems to work, but running this script gives me "Failed to open file." "STRAIN" is numeric value (041505) that needs to be joined by 'RESULT.01' as an input file to get.
#!/bin/ksh
HOST='192.168.68.52'
USER='dba'
PASSWD='dbadmin'
SOURCE_DIR='/home/testing'
TARGET_DIR='/home/final'
FILE='echo | cat FILE2.log'
cp /dev/null FILE.log
cp /dev/null FILE2.log
echo | cat STRAIN >> FILE.log
echo 'RESULT.01' >> FILE.log
# sleep 2
sed '$!N;s/\n//' FILE.log >> FILE2.log
ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
cd $SOURCE_DIR
get $FILE
quit
END_SCRIPT
exit 0