Xargs for email

From: Ron Sharcott <Sharcott_at_camosun.bc.ca>
Date: Wed, 29 Nov 2006 10:15:05 -0800

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)
Received on Wed Nov 29 2006 - 18:17:05 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:45 NZDT