Hi Marco, charles, ken & Anthony.

Thanks to all of you for the suggestions on the footer.
Below are a few tests I have run on the suggestions.

I think it would be useful to have the results on the lists, 
and perhaps you would like to correct the below a bit 
as others will be searching in the archives.

#Footer1 by Marco.
#-----------------------------------------
#!/bin/bash
for each in `ls /var/qmail/alias/pppdir.footer/new/`
do
cat /var/qmail/alias/footer.txt >> $each
mv $each /var/qmail/alias/pppdir3/new/
done
#----------------------------------------
#this generates files with the correct name
#but the file contains only the footer
#and the message is left in ..../pppdir.footer/new/filename


#footer2 by charles
#--------------------------------
#!/bin/bash
for file in /var/qmail/alias/pppdir.footer/new/*; do
base=`basename $file`
cat $file /var/qmail/alias/footer.txt > /var/qmail/alias/pppdir3/new/$base
rm $file 
done
#--------------------------------
# this script worked added the footer and removed the files correctly.
# I do not quite understand the warning on "rm"


#footer3 by ken
#------------------------------------
#!/bin/bash
cd /var/qmail/alias/pppdir.footer/new/          # go where files are
for ff in ./*.narada.col7.metta.lk              # select files
do
# slap on the footer and copy to wherever
cat $ff /var/qail/alias/footer.txt > /var/qmail/alias/pppdir3/new/
done                                            # that's it.
#------------------------------------
#this gives the error
#./footer3: /var/qmail/alias/pppdir3/new/: Is a directory
#./footer3: /var/qmail/alias/pppdir3/new/: Is a directory
# must be something small missing


#footer4 by Anthony
#------------------------------------
#!/bin/bash
footerfile=/var/qmail/alias/footer.txt
for mailfile in `ls /var/qmail/alias/pppdir.footer/new/`; do
  cat $footerfile >> $mailfile
  mv $mailfile /var/qmail/alias/pppdir3/new
done
#-----------------------------------
#this generates files with the correct name 
#but the file contains only the footer 
#and the message is left in ..../pppdir.footer/new/filename

thanks again
Jacob
from Sri Lanka.



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to