[xubuntu-users] Not able to execute .sh files

Patrice ARNAL patricearnal at gmx.fr
Sun Nov 29 22:47:02 UTC 2015



Le 29/11/2015 23:42, Michele Mor a écrit :
> Hi.
>
> Sorry for not replying earlier but did not have time to test your 
> suggestion.
> I think that I have made a mistake typical of a Window user.
>
> If I type in terminal: spoon.sh, then I have "spoon.sh: command not 
> found".
> If I type in terminal: ./spoon.sh, then everything works OK.
>
> My question is then: why does it work using ./ ?
Because, for "security" reason, the current directory (.)  is NOT by 
default in the $PATH variable which sets where commands can be found.
If you type ./spoon.sh, you give a full path to the command, bypassinbg 
the $PATH settings
>
> Thanks for your help.
> Michele
>
>
>
> On Wed, Nov 25, 2015 at 10:10 PM, Fred Roller <fredroller66 at gmail.com 
> <mailto:fredroller66 at gmail.com>> wrote:
>
>     True, ty. Better programming practice.
>
>     On 11/25/2015 04:49 PM, Ian wrote:
>
>         Try changing the first line of your script from #! bash to #!
>         /bin/bash
>
>
>
>     -- 
>     xubuntu-users mailing list
>     xubuntu-users at lists.ubuntu.com <mailto:xubuntu-users at lists.ubuntu.com>
>     Modify settings or unsubscribe at:
>     https://lists.ubuntu.com/mailman/listinfo/xubuntu-users
>
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/xubuntu-users/attachments/20151129/cc5d4860/attachment.html>


More information about the xubuntu-users mailing list