-   Linux - Newbie (
-   -   scripts not executing Manjaro Linux (

petersonflake 12-27-2019 12:52 PM

scripts not executing Manjaro Linux

First post so apologies in advance if there is any missing information.

I'm having a problem getting scripts to execute. When I check my path, with echo $PATH, I get the following output, showing that ~/.local/bin is in my path.


There, I have the following script:


#!/usr/bin/env bash
echo "hello world"

I used chmod +x to make the script executable.

When I run ./test, the script executes. When I run test, no error is output, but nothing happens. However, when I rename test to, and type, the script runs as expected. I suspect there is a problem with my shebang, but I don't know how to fix it.

I have tried #!/usr/bin/bash, #!/usr/bin/env sh #!/usr/bin/sh #!/bin/bash #!/bin/env sh and so on.

Has anyone encountered this before? These same steps worked as expected on other distributions.

pan64 12-27-2019 01:07 PM

because there is an app named test, also there is a shell builtin named test. You need to choose another name.

user@host:~$ which test
usr@host:~$ type test
test is a shell builtin

All times are GMT -5. The time now is 02:27 AM.