Path: 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: Organization: Hewlett-Packard ING-PWD, UK. Lines: 18 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~