Results 1 to 2 of 2
  1. #1


    Member Since
    Aug 31, 2012
    Posts
    1
    Question Intro & Shell Script Question
    Hi

    I am new 2 macs and have recently started working on some scripts

    if [-f /Applications/MyApp.app/Content/Database/File]; then

    exit 64
    fi

    exit 0

    Gives me all kinds of errors

    Basically I am looking for a file if found exit and return 64

    else

    just exit

    The script is part of an Iceberg installation.


  2. #2

    Dysfunction's Avatar
    Member Since
    Mar 17, 2008
    Location
    Tucson, AZ
    Posts
    6,881
    Specs:
    Way... way too many specs to list.
    You need an else, you're making a conditional here.

    Code:
    if [-f /Applications/MyApp.app/Content/Database/File]; then
    	exit 64
    else
    	echo 0
    fi
    mike
    This machine kills fascists
    Got # ? phear the command line!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Quick question regarding a shell script
    By Seventh in forum OS X - Operating System
    Replies: 1
    Last Post: 03-27-2012, 09:25 PM
  2. Shell script help
    By Hyper in forum OS X - Development and Darwin
    Replies: 12
    Last Post: 05-22-2011, 12:36 PM
  3. Terminal -- shell script -- script will only read two lines of a file
    By Straitsfan in forum OS X - Apps and Games
    Replies: 0
    Last Post: 01-30-2011, 10:04 PM
  4. New to the Forum - Intro & a Question or three...
    By The_Grudge in forum Switcher Hangout
    Replies: 6
    Last Post: 09-21-2007, 04:00 AM
  5. Shell script question
    By Niwrad in forum OS X - Development and Darwin
    Replies: 14
    Last Post: 06-28-2005, 05:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •