Executable file named 'test' is in $PATH but won't run
13
votes
1
answer
2765
views
I have a file in $HOME/bin (before you ask, yes, it is in my path) called
test
which I've confirmed can be executed fine when I run it with the full path to the file. However, I get a really weird issue when I don't run it this way. When I just run test
in the terminal, it doesn't do anything and returns immediately. I know that this isn't an issue of finding the file for several reasons:
1. There is no error message. Normally if the file can't be found or can't be executed a message will be printed out saying so.
2. Running which test
still returns the correct file path.
3. Probably the weirdest of all - the script works fine when run through strace
. I tried using strace
to see if I could figure out what was going on but when I ran it with strace
, it worked as expected with 0 issues.
Asked by ContronThePanda
(131 rep)
Feb 4, 2019, 10:32 PM
Last activity: Oct 3, 2024, 01:55 PM
Last activity: Oct 3, 2024, 01:55 PM