Script doesn't find file Suppose my_folder contains my_script and my_program. my_script tries to run ./my_program -myoptions. It works when I cd into the directory, but not when I double click on it.

Here is the output:

CasebashMac:~ chris$ /Users/chris/Programs/synergy-1.3.1\ 2/work_comp_server ; exit;
/Users/chris/Programs/synergy-1.3.1 2/work_comp_server: line 1: ./synergys: No such file or directory
logout


How can I fix this?
"./synergys" is a path relative to the directory which you are currently in. To fix this you will need to specify an absolute path, for example:


  /users/chris/Files/synergys


Obviously change it to a path that actually exists :)

Might be overkill, but there is a wikipedia page about paths:

Path_(computing)