I have the following shell script:
#!/bin/sh
cd $1
$1 is the path that I want to pass from the main.m which will call the script.
The script is located in the same directory as main.m.
How can I call a local script within the project?
Is it possible to compile the script into a binary so that when I execute the binary, it will also call the script?
Thanks
chmod 755 script.shyou are making it executable and can either place it in you PATH or run `./script.sh' to run it. Note that a script cannot change the environment of the parent meaning that it will change the directory but when the script exits nothing has changed for the parent shell.