Xargs for email

From: Ron Sharcott (Sharcott@camosun.bc.ca)
Date: Wed Nov 29 2006 - 13:15:05 EST


Anyone know if its possible to do the following?

who | awk '{print $1}' | sort -u | xargs -i echo `mailx -s "Nightly logoff
computers" {} < /messages/nightly.logoff.computers.msg`

Xargs seems to try and read the incoming file as if each word is a parameter
so the verbiage ends up in the 'To' line. Is there a better way to approach
this?

Ron Sharcott (3635)



This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 10:50:32 EDT