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




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 11-06-2009
redhead's Avatar
redhead redhead is offline
Registered User
 

Join Date: Feb 2002
Location: Denmark
Posts: 81
how about somethign like this:

Code:
#!/bin/ksh
for line in `/usr/bin/cat /u1/cutshellb.txt`; do
 /u1/sendreportmail.sh "$line" 1>sendmail.log 2>&1
done

and in the script have:
Code:
cd /u1/mail/bin/
./mailsend -i -vvvv   -tany_person@mailaddress.uk -s "Mail report " 
 -a/u1/$1.pdf "  "

But why not simply incorporate the mailsend command into the orriginal script ?
like:
Code:
#!/bin/ksh
for line in `/usr/bin/cat /u1/cutshellb.txt`; do
 /u1/mail/bin/mailsend -i -vvvv   -tany_person@mailaddress.uk -s "Mail report " 
 -a/u1/$line.pdf "  " 1>sendmail.log 2>&1