🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1811

Re: testing if a file is present

#1811
From: Ian Watson
Date: Wed, 21 Nov 1990 14:08
18 lines
1083 bytes
For the Bourne shell, try :

if [ -f file ] ; then
	mv file otherfile
fi

see test(1) for more details and other useful options.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ian Watson, HP Pinewood Information Systems Division, England.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Phone :				(Intl)+44 344 763015
Unix mail (Internet) :		ian@hpopd.HP.COM
Unix mail (UUCP) :		...!hplabs!hpopd!ian
Openmail :			ian watson/pinewood,lab,hpopd
Openmail from Unix :		ian_watson/pinewood_lab_hpopd@hpopd
HPDesk :			Ian WATSON/HP1600
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Technical Details
Message-ID: <28770002@hpopd.HP.COM>
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!otter.hpl.hp.com!hpopd!ian
References: <ger.659126250@prisma>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!otter.hpl.hp.com!hpopd!ian
From: ian@hpopd.HP.COM (Ian Watson)
Newsgroups: comp.unix.shell
Subject: Re: testing if a file is present
Message-ID: <28770002@hpopd.HP.COM>
Date: 21 Nov 90 14:08:41 GMT
References: <ger.659126250@prisma>
Organization: Hewlett-Packard ING-PWD, UK.
Lines: 18