Xargs for email



Solution provided.

# This is where we send a notice out to latenight users
#who | awk '{print $1}' | sort -u | while read user ; do
#mailx -s "Warning: logoff nightly" $user <
/messages/nightly.logoff.computers.msg
#done

Avoid xargs and redirects. Loop the task as in a multiline command or a
script. Of course some solutions offered included using xargs to call a
shell with the command but these came after I had something working.

And never start a subject line on this list with "Re:" if you want to let
others know what a solution is. A royal pain that.

Ron Sharcott (3635)


-----Original Message-----
From: Bluejay@xxxxxxxxxxxxxxxxx [mailto:Bluejay@xxxxxxxxxxxxxxxxx]
Sent: Thursday, November 30, 2006 8:32 AM
To: Ron Sharcott
Subject: Re: Xargs for email


What was the solution?

-
Bluejay Adametz

Make the most of what comes, and the least of what goes.




Ron Sharcott <Sharcott@xxxxxxxxxxxxx>
Sent by: tru64-unix-managers-owner@xxxxxxxx
11/30/2006 11:26

To
"'tru64-unix-managers@xxxxxxxx'" <tru64-unix-managers@xxxxxxxx> cc

Subject
Xargs for email






Thanks all. I believe I have a solution now.


Ron Sharcott (3635)



Relevant Pages

  • Xargs for email
    ... 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. ... Ron Sharcott ...
    (Tru64-UNIX-Managers)
  • Re: xargs: argument line too long
    ... when i run the following shell script, ... But can anyone tell,why does the script give me the error "xargs: ... It's a gratuitous use of cat but I like it better than putting the ... file as the input of the loop at the end. ...
    (comp.unix.admin)
  • Re: clean up virus from sendmail list file
    ... Refer to "xargs" for an explanation as to why I used the for loop. ... just that xargs does a better job explaining than I ...
    (comp.mail.sendmail)
  • Re: OT: bash scripting question -- passing values to ls
    ... > I use a little bash code over and over again. ... > Its a while loop. ... > It has many uses and it doesnt have a limit like xargs. ...
    (Debian-User)
  • Re: clean up virus from sendmail list file
    ... Refer to "xargs" for an explanation as to why I used the for loop. ...
    (comp.mail.sendmail)