• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Shell script build phases
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Shell script build phases


  • Subject: Shell script build phases
  • From: April Gendill <email@hidden>
  • Date: Sat, 20 Dec 2003 09:43:19 -0700

I need to write a shell script that tests for the existence of a file and then performs a function if the file is there.

I have spent hours in the man pages and online and have found that I cannot read english because even when I follow the examples I cannot make the script work...

here is the script I'm using:

if (filetest -e "/Path to/A file") then
rm "/Path to/A file"
fi


the reason i have the quotes is because the file name has many spaces in the path.
the error I get is either filetest: command not found
or if: Expression syntax
the first I get if I use sh the second with csh or tcsh
if have tried if [filetest -e "path to/a file" =1] then and I've just had if [filetest -e "path to/a file"] then
when using tcsh or csh and I still get expression syntax... Ok so is it a joke, or did every one leave out something that they assumed any idiot (except me) knew already?
?????
what am I doing wrong here?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: Shell script build phases
      • From: Eugene Lee <email@hidden>
  • Prev by Date: Re: docs for binding options in IB
  • Next by Date: Re: docs for binding options in IB
  • Previous by thread: Re: who is putting up this dialog?
  • Next by thread: Re: Shell script build phases
  • Index(es):
    • Date
    • Thread