I have a .sh file which is not becoming an executable. I tried doing it in the properties but as soon I ticked the checkbox, the tick vanished in a second.
I then tried
sudo chmod +x filename.sh
which returned nothing and after checking its properties, it dint turn into an executable. Any solutions?
. ./filename.sh
?sh ./filename.sh
- using.
(equivalent ofsource
) would parse it in the current shell, rather than spawning a subshell.sudo
? 2) What happens if you open a shell, cd to the the directory the script is in and typechmod +x filename.sh
? 3) What is the first line of filename.sh? Is that#!/usr/bin/env bash
or similar?