[K12OSN] How about a scripting question :-)

Jim Kronebusch jim at winonacotter.org
Sat Nov 11 14:44:16 UTC 2006


> > Why not just use > instead of >>? > should replace the file rather than
> > append, and then you wouldn't need to remove the file, either.
> 
> Yeah that's better, just have to move the redirection out of the loop:
> 
> #!/bin/sh
> MAILUSERS=$(getent group staff | cut -d':' -f4 | sed 's/,/ /g')
> for EACH in $MAILUSERS; do
>    echo "$EACH at winonacotter.org OK"
> done > /etc/mailusers
> postmap hash:/etc/mailusers

Thanks again everyone for all your help.  I will implement the new script 
and the Postfix changes over the Thanksgiving break.  Once again....

THIS LIST ROCKS!!!

-- 
This message has been scanned for viruses and
dangerous content by the Cotter Technology 
Department, and is believed to be clean.




More information about the K12OSN mailing list