am writing a post session shell script where i have to count the target which is a flat file row count and if the count is greater then 500 then send a mail notifying the same. But there are some errors in the script.
DIR="/data/research_dev/inbfiles"
cd /data/research_dev/inbfiles
if [ "$(wc -l ff_invoicepreviewqueue1.csv)" > 500 ]; then
echo "Hi," > InvoicePreview.dat
echo " The row count of InvoicePreviewQueue is: " >> InvoicePreview.dat
#wc -l ff_invoicepreviewqueue1.csv >> InvoicePreview.dat
echo " " >> InvoicePreview.dat
echo " " >> InvoicePreview.dat
echo "Thanks and Regards," >> InvoicePreview.dat
echo "BI Support team." >> InvoicePreview.dat
mailx -s "Alert!! Count is out of limits!! " "correia.blossom@rexelholdingsusa.com" < InvoicePreview.dat
rm -f InvoicePreview.dat.dat
#