Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

KSH Script error "./auth_report.ksh[28]: syntax error at line 35 : `"' unmatched"

Status
Not open for further replies.

sjcrane

MIS
Jan 18, 2006
41
0
0
US
rm /tmp/auth.txt.rpt /tmp/auth.txt

DATE=$(date) # Set DATE equal to the output of running the shell command date
HOSTNAME=$(hostname) # Set HOSTNAME equal to the output of the hostname command

echo "" > /tmp/auth.txt.rpt
echo "" >> /tmp/auth.txt.rpt
echo "=======================================================================" >> /tmp/auth.txt.rpt
echo "XXXXXXXXXXXX Authentication Report for:" "$(date)" "$(hostname)" >> /tmp/auth.txt.rpt
echo "=======================================================================" >> /tmp/auth.txt.rpt

/opt/pbis/bin/eventlog-cli -t - localhost > /tmp/auth.txt

echo "" >/tmp/auth.txt.rpt
echo "" >>/tmp/auth.txt.rpt
echo "" >>/tmp/auth.txt.rpt
echo "" >>/tmp/auth.txt.rpt
cat /tmp/auth.txt >> /tmp/auth.txt.rpt
echo "" >>/tmp/auth.txt.rpt
echo "" >>/tmp/auth.txt.rpt
echo "" >>/tmp/auth.txt.rpt
echo "=======================================" >> /tmp/auth.txt.rpt
echo "Report Completed " >>/tmp/auth.txt.rpt" >> /tmp/auth.txt.rpt
echo "=======================================" >> /tmp/auth.txt.rpt
echo "" >>/tmp/auth.txt.rpt
echo "" >>/tmp/auth.txt.rpt
echo "" >>/tmp/auth.txt.rpt
echo "" >>/tmp/auth.txt.rpt

mail -s "LDAP Authentication Report" xxxxx@xxxx.org </tmp/auth.txt.rpt
 
Sorry,

Found the issue and is now resolved:


Before:

echo "=======================================" >> /tmp/auth.txt.rpt
echo "Report Completed " >>/tmp/auth.txt.rpt" >> /tmp/auth.txt.rpt
echo "======================================" >> /tmp/auth.txt.rpt


After:

echo "=======================================" >> /tmp/auth.txt.rpt
echo "Report Completed " >>/tmp/auth.txt.rpt"
echo "======================================" >> /tmp/auth.txt.rpt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top