Re: My bash script is missing something - what?
On 10/10/2016 04:10 PM, Richard Owlett wrote:
> On 10/10/2016 8:00 AM, Robert Parker wrote:
>> you need to do:
>> ./test.sh
>> instead.
>>
>
> That just fails differently by responding:
>
> : No such file or directory
Where ever the script is, it does have to be in the $PATH or else you
must run it using including a relative or absolute path to its location.
About your error message "bash: test.sh: command not found", you might
try putting the full paths to mount and grep in your script. Or else
explicitly set the $PATH variable to something useful at the beginning
of the script.
If that was not it, you can use the set -x option with bash to trace the
script's actions.
#!/bin/bash -x
That prints out each line as it will be run just before it is actually
run, to see what precisely is causing the failure.
Regards,
Lars
Reply to: