Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!snorkelwacker!bloom-beacon!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.questions Subject: Re: SEX! or, how do I mail to a lot of unix users? Message-ID: <1990Jun5.081724.26014@athena.mit.edu> Date: 5 Jun 90 08:17:24 GMT References: <900531083002.30e0d06c@Csa2.LBL.Gov> <132@motto.UUCP> Sender: news@athena.mit.edu (News system) Reply-To: jik@athena.mit.edu (Jonathan I. Kamens) Organization: Massachusetts Institute of Technology Lines: 30 In article <132@motto.UUCP>, murray@motto.UUCP (Murray S. Kucherawy) writes: |> 2) % foreach i (/u/*) |> ? mail -s "Memo for you" $i < source-file |> ? echo sent to $i |> ? end |> |> That oughta do it... No, actually, it shouldn't "oughta do it". If you do that, you're going to attempt to send mail to a lot of addresses of the form /u/username, something which is in all probability not going to work. Either you want to change the first line to foreach i (`cd /u; echo *`) or you want to change the second line to mail -s "Memo for you" $i:t < source-file In any case, this doesn't answer the [amended] question which was asked, since the original poster was talking about sending to everyone at a remote site. However, I don't like to see wrong information posted, even when the wrong information wouldn't answer the right question even if it were right :-). Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8495 Home: 617-782-0710