04-25-2013
Help with error "syntax error: unexpected end of file"
Hi Techies,
can anyone please debug the following Script and let me know what is going wrong here.
im getting the following error
Quote:
scripts$ ./retrieve-ETN-EMTN-enrichment-data.sh
./retrieve-ETN-EMTN-enrichment-data.sh: line 528: syntax error: unexpected end of file
Code :
#!/usr/bin/bash
# ##############################################################################################
#
# Variables
#
# ##############################################################################################
# General
curdir=`pwd`
dt=`date +%Y%m%d`
dateprefix=$(date '+20%y%m%d')
pvuserhomedir=/home/pvuser
rpmbenkdir="$pvuserhomedir"/Scripts/Interfaces/NIM
# Connection details
cramer4=XX.XX.XX.XX
USER_CRAMER4="XXXXX"
UPASSWD_CRAMER4="XXXXX"
FILEDIR_CRAMER4="/afs2/nimprd/current/data/P707/rpm/extract"
cramer6="XX.XX.XX.XX"
USER_CRAMER6="XXXXX"
UPASSWD_CRAMER6="YYYYY"
FILEDIR_CRAMER6="/ora/oss/OSS80/DB_DIR/bnsbvt/xxxx/yyyy/"
# Log directory and filename
logdir="$rpmbenkdir"/log
logfile=`date '+retrieve-ETN-EMTN-enrichment-data-log-20%y%m%d.log'`
# Directory containing configuration files: (header, footer) for error checking and mailing; file with static entries; etc
configdir="$rpmbenkdir"/config
# Download directory
downloaddir="$rpmbenkdir"/downloads
# Intermediate work directory and files
workdir="$rpmbenkdir"/work
ETN_nodesC6_file=ETN-nodes_C6.csv
EMTN_nodesC6_file=EMTN-nodes_C6.csv
#ETN_nodesC4C6_file=ETN-nodes_C4C6.csv
ETN_nodesC6_errorfree_file=ETN-nodes_C6_errorfree.csv
ETN_EMTN_nodesC6_file=ETN-EMTN-nodes_C6.csv
ETN_EMTN_nodesC6_withmanualentries_file=ETN-EMTN-nodes_C6_withmanualentries.csv
#ETN_portsC4_file=ETN-ports_C4.csv
ETN_portsC6_Alcatel_file=ETN-ports_C6_Alcatel.csv
ETN_portsC6_WWP_file=ETN-ports_C6_WWP.csv
ETN_portsC6_Huawei_file=ETN-ports_C6_Huawei.csv
ETN_portsC6_file=ETN-ports_C6.csv
ETN_portsC4C6_file=ETN-ports_C4C6.csv
ETN_portsC4C6_errorfree_file=ETN-ports_C4C6_errorfree.csv
ETN_portsC4C6_withmanualentries_file=ETN-ports_C4C6_withmanualentries.csv
# Output directory and files
outputdir="$rpmbenkdir"/output
nodes_outputfile="ETN_EMTN_nodes_seedfile.txt"
ports_outputfile="ETN_ports_seedfile.txt"
# Archive directories
workarchivedir="$workdir"/archive
outputarchivedir="$outputdir"/archive
# Directory for scripts: compare-files.pl, ETN-ADD.pl, process-ETN-nodes.pl, etc
scriptdir="$rpmbenkdir"/scripts
# Communication error emails
communication_error_C4_email_file=$configdir/commu_error_C4.txt
communication_error_C6_etnnodes_email_file=$configdir/commu_error_C6_etn-nodes.txt
communication_error_C6_EMTNNode_email_file=$configdir/commu_error_C6_EMTN-Node.txt
communication_error_C6_alcatelport_email_file=$configdir/commu_error_C6_alcatel-port.txt
communication_error_C6_wwpport_email_file=$configdir/commu_error_C6_wwp-port.txt
communication_error_C6_huaweiport_email_file=$configdir/commu_error_C6_huawei-port.txt
# ##############################################################################################
#
# Start
#
# ##############################################################################################
cd $pvuserhomedir
# Log starting of script including timestamp
echo "=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=" >> $logdir/$logfile
echo "Starting: retrieve-ETN-EMTN-enrichment-data.sh" >> $logdir/$logfile
echo "Description: Retrieves files from NIM C4 and NIM C6, with network inventory info" >> $logdir/$logfile
echo " on ETN nodes and ports and EMTN nodes." >> $logdir/$logfile
echo " Invokes scripts to create seedfiles for RPM." >> $logdir/$logfile
date >> $logdir/$logfile
echo "=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=" >> $logdir/$logfile
echo "" >> $logdir/$logfile
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% NODES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
NODES_COMM_ERR=0
echo "" >> $logdir/$logfile
echo "%%%%% NODES %%%%%" >> $logdir/$logfile
echo "" >> $logdir/$logfile
# ###########################
#
# * Retrieve NIM C6 file: etn-nodes
#
# ###########################
if [ $NODES_COMM_ERR -ne 1 ]
then
echo "+ Retrieving NIM C6 file: etn-nodes_..." >> $logdir/$logfile
# Download file
cd $downloaddir
ftp -i -v -n $cramer6 <<**>> $logdir/$logfile
user $USER_CRAMER6 $UPASSWD_CRAMER6
cd $FILEDIR_CRAMER6
mget $(date '+etn-nodes_20%y%m%d*.csv')
bye
**
#cd $downloaddir
#sftp $USER_CRAMER6@$cramer6 <<**>> $logdir/$logfile
#cd $FILEDIR_CRAMER6
#mget $(date '+etn-nodes_20%y%m%d*.csv')
#bye
#**
# Check if file is downloaded succesfully
if [ -f $downloaddir$(date '+/etn-nodes_20%y%m%d*.csv') ]
then
echo " ++++ Succesfully downloaded NIM C6 file: etn-nodes" >> $logdir/$logfile
# Create a copy of the downloaded file, but without time in filename.
# Original file will remain in download folder for couple of days (archiving)
cp $downloaddir$(date '+/etn-nodes_20%y%m%d*.csv') $workdir$(date '+/etn-nodes_20%y%m%d.csv')
else
echo "ERROR: Problem downloading NIM C6 file: etn-nodes" >> $logdir/$logfile
echo "INFO: Sending e-mail about the communication error" >> $logdir/$logfile
# Notify helpdesk and Functional Manager RPM by e-mail about communication error
mailx -s "NIM C6 (BENK)-Proviso Interface: communication error" helpdesk_vm_im@kpn.com < $communication_error_C6_etnnodes_email_file
mailx -s "NIM C6 (BENK)-Proviso Interface: communication error" eric.kras@kpn.com < $communication_error_C6_etnnodes_email_file
# Raise flag to prevent further creation of nodes seedfile
NODES_COMM_ERR=1
fi
else
echo "INFO: Skipping NIM C6 file: etn-nodes" >> $logdir/$logfile
fi
# ###########################
#
# * Retrieve NIM C6 file: EMTN-Node
#
# ###########################
if [ $NODES_COMM_ERR -ne 1 ]
then
echo "+ Retrieving NIM C6 file: EMTN-Node_..." >> $logdir/$logfile
# Download file
cd $downloaddir
ftp -i -v -n $cramer6 <<**>> $logdir/$logfile
user $USER_CRAMER6 $UPASSWD_CRAMER6
cd $FILEDIR_CRAMER6
mget $(date '+EMTN-Node_20%y%m%d*.csv')
bye
**
#cd $downloaddir
#sftp $USER_CRAMER6@$cramer6 <<**>> $logdir/$logfile
#cd $FILEDIR_CRAMER6
#mget $(date '+EMTN-Node_20%y%m%d*.csv')
#bye
#**
# Check if file is downloaded succesfully
if [ -f $downloaddir$(date '+/EMTN-Node_20%y%m%d*.csv') ]
then
echo " ++++ Succesfully downloaded NIM C6 file: EMTN-Node" >> $logdir/$logfile
# Create a copy of the downloaded file, but without time in filename.
# Original file will remain in download folder for couple of days (archiving)
cp $downloaddir$(date '+/EMTN-Node_20%y%m%d*.csv') $workdir$(date '+/EMTN-Node_20%y%m%d.csv')
else
echo "ERROR:Problem downloading NIM C6 file: EMTN-Node" >> $logdir/$logfile
echo "INFO: Sending e-mail about the communication error" >> $logdir/$logfile
# Notify helpdesk and Functional Manager RPM by e-mail about communication error
mailx -s "NIM C6 (BENK)-Proviso Interface: communication error" helpdesk_vm_im@kpn.com < $communication_error_C6_EMTNNode_email_file
mailx -s "NIM C6 (BENK)-Proviso Interface: communication error" eric.kras@kpn.com < $communication_error_C6_EMTNNode_email_file
# Raise flag to prevent further creation of nodes seedfile
NODES_COMM_ERR=1
fi
else
echo "INFO: Skipping NIM C6 file: EMTN-Node" >> $logdir/$logfile
fi
# ###########################
#
# * Call create-ETN-EMTN-nodes-seedfile.sh
#
# ###########################
if [ $NODES_COMM_ERR -ne 1 ]
then
echo ">>> Invoking: create-ETN-EMTN-nodes-seedfile.sh " >> $logdir/$logfile
$scriptdir/create-ETN-EMTN-nodes-seedfile.sh
else
echo "INFO: Skipping: create-ETN-EMTN-nodes-seedfile.sh " >> $logdir/$logfile
fi
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PORTS_COMM_ERR=0
echo "" >> $logdir/$logfile
echo "%%%%% PORTS %%%%%" >> $logdir/$logfile
echo "" >> $logdir/$logfile
# ###########################
#
# * Retrieve NIM C6 file: alcatel-port
#
# ###########################
if [ $PORTS_COMM_ERR -ne 1 ]
then
echo "+ Retrieving NIM C6 file: alcatel-port_..." >> $logdir/$logfile
# Download file
cd $downloaddir
ftp -i -v -n $cramer6 <<**>> $logdir/$logfile
user $USER_CRAMER6 $UPASSWD_CRAMER6
cd $FILEDIR_CRAMER6
mget $(date '+alcatel-port_20%y%m%d*.csv')
bye
**
#cd $downloaddir
#sftp $USER_CRAMER6@$cramer6 <<**>> $logdir/$logfile
#cd $FILEDIR_CRAMER6
#mget $(date '+alcatel-port_20%y%m%d*.csv')
#bye
#**
# Check if file is downloaded succesfully
if [ -f $downloaddir$(date '+/alcatel-port_20%y%m%d*.csv') ]
then
echo " ++++ Succesfully downloaded NIM C6 file: alcatel-port" >> $logdir/$logfile
# Create a copy of the downloaded file, but without time in filename.
# Original file will remain in download folder for couple of days (archiving)
cp $downloaddir$(date '+/alcatel-port_20%y%m%d*.csv') $workdir$(date '+/alcatel-port_20%y%m%d.csv')
else
echo "ERROR: Problem downloading NIM C6 file: alcatel-port" >> $logdir/$logfile
echo "INFO: Sending e-mail about the communication error" >> $logdir/$logfile
# Notify helpdesk and Functional Manager RPM by e-mail about communication error
mailx -s "NIM C6 (BENK)-Proviso Interface: communication error" helpdesk_vm_im@kpn.com < $communication_error_C6_alcatelport_email_file
mailx -s "NIM C6 (BENK)-Proviso Interface: communication error" eric.kras@kpn.com < $communication_error_C6_alcatelport_email_file
# Raise flag to prevent further creation of ports seedfile
PORTS_COMM_ERR=1
fi
else
echo "INFO: Skipping NIM C6 file download: alcatel-port" >> $logdir/$logfile
fi
# ###########################
#
# * Retrieve NIM C6 file: wwp-port
#
# ###########################
if [ $PORTS_COMM_ERR -ne 1 ]
then
echo "+ Retrieving NIM C6 file: wwp-port_..." >> $logdir/$logfile
# Download file
cd $downloaddirl
ftp -i -v -n $cramer6 <<**>> $logdir/$logfile
user $USER_CRAMER6 $UPASSWD_CRAMER6
cd $FILEDIR_CRAMER6
mget $(date '+wwp-port_20%y%m%d*.csv')
bye
**
#cd $downloaddir
#sftp $USER_CRAMER6@$cramer6 <<**>> $logdir/$logfile
#cd $FILEDIR_CRAMER6
#mget $(date '+wwp-port_20%y%m%d*.csv')
#bye
#**
# Check if file is downloaded succesfully
if [ -f $downloaddir$(date '+/wwp-port_20%y%m%d*.csv') ]
then
echo " ++++ Succesfully downloaded NIM C6 file: wwp-port" >> $logdir/$logfile
# Create a copy of the downloaded file, but without time in filename.
# Original file will remain in download folder for couple of days (archiving)
cp $downloaddir$(date '+/wwp-port_20%y%m%d*.csv') $workdir$(date '+/wwp-port_20%y%m%d.csv')
else
echo "ERROR: Problem downloading NIM C6 file: wwp-port" >> $logdir/$logfile
echo "INFO: Sending e-mail about the communication error" >> $logdir/$logfile
# Notify helpdesk and Functional Manager RPM by e-mail about communication error
mailx -s "NIM C6 (BENK)-Proviso Interface: communication error" helpdesk_vm_im@kpn.com < $communication_error_C6_wwpport_email_file
mailx -s "NIM C6 (BENK)-Proviso Interface: communication error" eric.kras@kpn.com < $communication_error_C6_wwpport_email_file
# Raise flag to prevent further creation of ports seedfile
PORTS_COMM_ERR=1
fi
else
echo "INFO: Skipping NIM C6 file download: wwp-port" >> $logdir/$logfile
fi
# ###########################
#
# * Retrieve NIM C6 file: huawei-port
#
# ###########################
if [ $PORTS_COMM_ERR -ne 1 ]
then
echo "+ Retrieving NIM C6 file: huawei-port_..." >> $logdir/$logfile
# Download file
cd $downloaddirl
ftp -i -v -n $cramer6 <<**>> $logdir/$logfile
user $USER_CRAMER6 $UPASSWD_CRAMER6
cd $FILEDIR_CRAMER6
mget $(date '+huawei-port_20%y%m%d*.csv')
bye
**
#cd $downloaddir
#sftp $USER_CRAMER6@$cramer6 <<**>> $logdir/$logfile
#cd $FILEDIR_CRAMER6
#mget $(date '+huawei-port_20%y%m%d*.csv')
#bye
#**
# Check if file is downloaded succesfully
if [ -f $downloaddir$(date '+/huawei-port_20%y%m%d*.csv') ]
then
echo " ++++ Succesfully downloaded NIM C6 file: huawei-port" >> $logdir/$logfile
# Create a copy of the downloaded file, but without time in filename.
# Original file will remain in download folder for couple of days (archiving)
cp $downloaddir$(date '+/huawei-port_20%y%m%d*.csv') $workdir$(date '+/huawei-port_20%y%m%d.csv')
else
echo "ERROR: Problem downloading NIM C6 file: huawei-port" >> $logdir/$logfile
echo "INFO: Sending e-mail about the communication error" >> $logdir/$logfile
# Notify helpdesk and Functional Manager RPM by e-mail about communication error
mailx -s "NIM C6 (BENK)-Proviso Interface: communication error" helpdesk_vm_im@kpn.com < $communication_error_C6_huaweiport_email_file
mailx -s "NIM C6 (BENK)-Proviso Interface: communication error" eric.kras@kpn.com < $communication_error_C6_huaweiport_email_file
# Raise flag to prevent further creation of ports seedfile
#PORTS_COMM_ERR=1 -commented till huawei nodes are available
fi
else
echo "INFO: Skipping NIM C6 file download: huawei-port" >> $logdir/$logfile
fi
# ###########################
#
# * Call create-ETN-ports-seedfile.sh
#
# ###########################
if [ $PORTS_COMM_ERR -ne 1 ]
then
echo ">>> Invoking: create-ETN-ports-seedfile.sh" >> $logdir/$logfile
$scriptdir/create-ETN-ports-seedfile.sh
else
echo "INFO: Skipping: create-ETN-ports-seedfile.sh " >> $logdir/$logfile
fi
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CLEAN-UP ARCHIVE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
echo "" >> $logdir/$logfile
echo "%%%%% Archiving & archive cleaning %%%%%" >> $logdir/$logfile
echo "" >> $logdir/$logfile
# ###########################
#
# 3) Archive and delete old archive files (& logfiles)
#
# ###########################
echo "+ Archiving & deleting old archive files " >> $logdir/$logfile
if [ $NODES_COMM_ERR -ne 1 ]
then
# Move workfiles to archive
# mv $workdir/$ETN_nodesC4_file $workarchivedir/$dateprefix'_'$ETN_nodesC4_file
mv $workdir/$ETN_nodesC6_file $workarchivedir/$dateprefix'_'$ETN_nodesC6_file
mv $workdir/$EMTN_nodesC6_file $workarchivedir/$dateprefix'_'$EMTN_nodesC6_file
mv $workdir/$ETN_nodesC4C6_file $workarchivedir/$dateprefix'_'$ETN_nodesC4C6_file
mv $workdir/$ETN_nodesC6_errorfree_file $workarchivedir/$dateprefix'_'$ETN_nodesC6_errorfree_file
mv $workdir/$ETN_EMTN_nodesC6_file $workarchivedir/$dateprefix'_'$ETN_EMTN_nodesC6_file
mv $workdir/$ETN_EMTN_nodesC6_withmanualentries_file $workarchivedir/$dateprefix'_'$ETN_EMTN_nodesC6_withmanualentries_file
else
echo "INFO: Skipping: archiving of nodes work files" >> $logdir/$logfile
fi
if [ $PORTS_COMM_ERR -ne 1 ]
then
if [ $NODES_COMM_ERR -ne 1 ]
then
# Move workfiles to archive
# mv $workdir/$ETN_portsC4_file $workarchivedir/$dateprefix'_'$ETN_portsC4_file
mv $workdir/$ETN_portsC6_Alcatel_file $workarchivedir/$dateprefix'_'$ETN_portsC6_Alcatel_file
mv $workdir/$ETN_portsC6_WWP_file $workarchivedir/$dateprefix'_'$ETN_portsC6_WWP_file
mv $workdir/$ETN_portsC6_Huawei_file $workarchivedir/$dateprefix'_'$ETN_portsC6_Huawei_file
mv $workdir/$ETN_portsC6_file $workarchivedir/$dateprefix'_'$ETN_portsC6_file
mv $workdir/$ETN_portsC4C6_file $workarchivedir/$dateprefix'_'$ETN_portsC4C6_file
mv $workdir/$ETN_portsC4C6_errorfree_file $workarchivedir/$dateprefix'_'$ETN_portsC4C6_errorfree_file
mv $workdir/$ETN_portsC4C6_withmanualentries_file $workarchivedir/$dateprefix'_'$ETN_portsC4C6_withmanualentries_file
else
echo "INFO: Skipping: archiving of ports work files" >> $logdir/$logfile
fi
else
echo "INFO: Skipping: archiving of ports work files" >> $logdir/$logfile
fi
# Remove remaining workfiles (copies of downloaded files)
rm $workdir/*.*
# Copy outputfiles to archive
cp $outputdir/$nodes_outputfile $outputarchivedir/$dateprefix'_'$nodes_outputfile
cp $outputdir/$ports_outputfile $outputarchivedir/$dateprefix'_'$ports_outputfile
# Delete files older than 2 weeks from the archive folders
find $downloaddir -mtime +15 -exec rm {} \;
find $workarchivedir -mtime +15 -exec rm {} \;
find $outputarchivedir -mtime +15 -exec rm {} \;
# Delete logfiles older than 2 weeks
find $logdir -mtime +15 -exec rm {} \;
# ##############################################################################################
#
# End
#
# ##############################################################################################
# Log starting of script including timestamp
echo "" >> $logdir/$logfile
echo "=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=" >> $logdir/$logfile
echo "End of script: retrieve-ETN-enrichment-data.sh" >> $logdir/$logfile
date >> $logdir/$logfile
echo "=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=" >> $logdir/$logfile
i want to fix this ASAP, any help would be greatly appreciated.
Thanks a bunch in advance
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to run the script bellow but its given me "syntax error at line 20 :'done' unexpected." error message"
can someone check to see if the script is ok? and correct me pls.
Today is my first day with scripting.
Gurus should pls help out
#!/bin/ksh
# Purpose: Check to see if file... (3 Replies)
Discussion started by: ibroxy
3 Replies
2. UNIX for Dummies Questions & Answers
hi there
i write one awk script file in shell programing
the code is related to dd/mm/yy to month, day year format
but i get an error
please can anybody help me out in this problem ??????
i give my code here including error
awk `
# date-month -- convert mm/dd/yy to month day,... (2 Replies)
Discussion started by: Herry
2 Replies
3. Solaris
one of my script as follows
HOME=/apps/logs
mv $HOME/cron.log $HOME/cron.log.`date +%Y-%m-%d`
touch $HOME/cron.log
fi
i am getting error as follows
on the last line we are getting ...
"syntax error near unexpected token `fi' "
please suggest.... (4 Replies)
Discussion started by: GIC1986
4 Replies
4. Shell Programming and Scripting
I have a very simple script that reads in the contents of a file (_open.txt) into an array "lyrics":
#!/bin/sh
# read in the text
lyrics=( `cat _open.txt` | tr '\n' ' ')
exit 0
It gives the following error message:
./lyrics.sh: 1: Syntax error: word unexpected (expecting ")")
I have... (9 Replies)
Discussion started by: figaro
9 Replies
5. Shell Programming and Scripting
Hello forum,
I hope my problem is easy to solve for someone in here!
My main task is to copy a large amount of imap-accounts from one server to another. There is a tool (Perl) called imapsync which does the job exellent. Unfortunately I'm only able to run it on one account at a time.
After... (3 Replies)
Discussion started by: primaxx
3 Replies
6. Shell Programming and Scripting
the below code will search attr string inside makefile under the modelno on given path.
echo "Enter model no for searching string inside makefile"
read inputs2
#find /pools/home_unix/sapte/work/models/model/$inputs2 -name "makefile" | xargs grep "attr" \;
#;;I am getting below error.... (7 Replies)
Discussion started by: lathigara
7 Replies
7. Shell Programming and Scripting
Hi All,
Please hav a look at the below peice of script and let me know if there are any syntax errors.
i found that the below peice of Script is causing issue. when i use SFTP its working fine, but there is a demand to use FTP only. please find below code and explain if anything is wrong... (1 Reply)
Discussion started by: mahi_mayu069
1 Replies
8. Shell Programming and Scripting
While i m running below code, it is giving me the error"syntax error at line 15: `end of file' unexpected".
Pls let me know what is wrong here..i tried many ways, but no luck
dbSID="SWQE"
usrname="apps"
password="Wrgthrk3"
count=0
while
do
sqlplus $usrname/$password@$dbSID... (5 Replies)
Discussion started by: millan
5 Replies
9. BSD
#!/bin/bash
#--------------------------------------------------------
# Setup prompt
# Author Zeeshan Mirza
# Data: 06-08-2017
#--------------------------------------------------------
if
then
. ./.profile_custom_pre
fi
umask 022
set -o vi
export EDITOR=vi
export VISUAL=vi... (3 Replies)
Discussion started by: getzeeshan
3 Replies
10. Shell Programming and Scripting
Hello all,
I am running a script to generate a report and mail it to an email address.
When I am trying to validate whether the file is a 0 kb file, I am getting the below error.
Error: "Syntax error; unexpected end of file"
Any suggestions please?
Code:
#!/bin/sh
.... (1 Reply)
Discussion started by: Pradeep_Raj
1 Replies