*BSD News Article 67812


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!hobyah.cc.uq.oz.au!bunyip.cc.uq.oz.au!munnari.OZ.AU!news.ecn.uoknor.edu!paladin.american.edu!gatech!news.mathworks.com!fu-berlin.de!zrz.TU-Berlin.DE!zib-berlin.de!news.tu-chemnitz.de!irz401!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.bsdi.misc,comp.unix.bsd.misc,comp.unix.bsd.freebsd.misc
Subject: Re: Q: How to create executable files?
Date: 6 May 1996 07:43:37 GMT
Organization: Private BSD site, Dresden
Lines: 43
Message-ID: <4mkaj9$51s@uriah.heep.sax.de>
References: <4mg599$clu@news.aimnet.com> <4mgm2j$g1t@paperboy.livenet.net>
  <4mh10c$dfd@mark.ucdavis.edu> <4miodb$m9g@news.aimnet.com>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.6
X-Phone: +49-351-2012 669
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F  93 21 E0 7D F9 12 D6 4E
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.bsdi.misc:3672 comp.unix.bsd.misc:924 comp.unix.bsd.freebsd.misc:18839

trh@aimnet.com (TRH TRH) wrote:

> #!/bin/csh -f

Ick.  ``csh programming considered harmful.'' :)

> 
> if ( -e "t-l/$1" ) then
> 
> src/msmtp9 $1 t-l aimnet.aimnet.com mailhub.aimnet.com
  ./src/msmtp9 $1 t-l aimnet.aimnet.com mailhub.aimnet.com
> rm t-l/$1.ssdomain
> rm t-l/$1.tout
> rm t-l/$1.running
> elm -s $1.notsent trh < t-l/$1.notsent
> rm t-l/$1.notsent
> rm gec$1
> 
> else
> 
> if ( -e "tt-l/$1" ) then
  elsif (-e "tt-l/$1" ) then
> 
> src/msmtp9 $1 tt-l aimnet.aimnet.com mailhub.aimnet.com
  ./src/msmtp9 $1 tt-l aimnet.aimnet.com mailhub.aimnet.com
> rm tt-l/$1.ssdomain
> rm tt-l/$1.tout
> rm tt-l/$1.running
> elm -s $1.notsent trh < tt-l/$1.notsent
> rm tt-l/$1.notsent
> rm gec$1
> else
> 	echo "$1 does not exist!"
> endif

Further, better turn all "rm"s into "rm -f"s.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)