I have a bash script that runs a program which generates files (into the current directory it was run from), then the bash script checks for them, and their sizes.
When I run this script from the terminal, everything works fine, the files are created, found, and reported on.
The problem is that this is supposed to be basic user friendly, and needs to be clickable to run. The script runs when clicked, however, the files don't seem to be generated (maybe they are somewhere else?) and therefore the report is failed as the files aren't found.
In this script, I do a cd ~/path/to/location before calling the program.
#!/usr/bin/env bash cd ~/path/to/location ./someprogram if [ touch output.txt ]; then echo "FILE EXISTS" fi