home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!cs.utexas.edu!ut-emx!ibmchs!auschs!awdprime.austin.ibm.com!stuart
- From: stuart@austin.ibm.com (Stuart R. Yoder)
- Newsgroups: comp.editors
- Subject: Re: SUMMARY sending mail from shell
- Message-ID: <1992Aug25.134245.3394@awdprime.austin.ibm.com>
- Date: 25 Aug 92 13:42:45 GMT
- References: <1992Aug24.143011.4661@news.duc.auburn.edu>
- Sender: news@awdprime.austin.ibm.com (USENET News)
- Reply-To: stuart@piobe.austin.ibm.com
- Organization: IBM Austin
- Lines: 31
- Originator: stuart@piobe.austin.ibm.com
-
-
- In article <1992Aug24.143011.4661@news.duc.auburn.edu>, hendefd@woof.duc.auburn.edu (Frank Henderson) writes:
- > original post:
- > >I need a shell script (csh or sh) to send me mail after completion.
- > >I tried /usr/lib/sendmail -bm -fperson -t me and then echo'ing a
- > >message but this requires an EOF or CTRL-d which I don't know how
- > >to do from a shell. Could someone tell me how to do this or suggest
- > >a better way.
- >
- > The popular answer was use mail:
- > mail -s "$0 done" user << EOS
- > Hey, $0 finished at `date`.
- > All these folks were on the system at the time:
- > `who`
- > EOS
- >
- > Most everyone gave this response with slightly different flavors.
- >
- > Also - echo '\004' is control D.
- >
-
- As a follow up to this, is there a way to send mail from a shell
- (as described above) but also copy other users on the message
- ( Cc: foo@bar ). When I use the mail command interactively, it
- prompts for Cc:, but non-interactively I can't figure out how
- to copy users on a message.
- --
- -Stuart
- -----------------------------------------------------------
- My opinions are mine and not those of my employer.
- -----------------------------------------------------------
-