ok ive spent a lot of time re-writing it
mail <<!
s /users/tec/csm/wh00/cam10682/bin/nextmail
q
!
tmp=`grep -c unixassessment2002 nextmail`
if [tmp = 1] then
emailaddy=`grep Reply-To: nextmail |sed -e "s/Reply-To: //"`
name=`grep NameToAdd nextmail |sed -e "s/NameToAdd...
so my script starts with
mail <<!
s /users/tec/csm/wh00/cam10682/nextmail
q
!
#then do this to the files
tmp=`grep -c unixassessment2002 nextmail`
if tmp > 0 then
emailaddy=`grep Reply-To: nextmail |sed -e "s/Reply-To: //"`
name=`grep NameToAdd nextmail |sed -e "s/NameToAdd...
it works when I paste it in just not when I put it into a script, so that I can read the mail do some processing then, read the next one besause the save command removes the email.
I cannot get this to work inside a korn shell script, if I type the commands in then it does it but if I put it in a script and run it it doesnt work. the code I am trying to use is:
mail <<! <- open the mail program for using prompts
s nextmail <- save mail into nextmail file
q <-quit out
! <-...
thanks mike for your help. Unfortuately it doesnt appear to work.
what I typed in was
mail <<!
s temp
q
!
but it only created an ! file.
can you assist?
Im writing a script that needs to read a mail, save it then do some processing on the saved file then delete the mail according to the results of the processing....
I was wondering if it were possible to write a script file so that you could do mail -s filename....(which cant be run as -s is a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.