Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3546

Raspberry Pi OS • bash: "command not found"

$
0
0
Hi there

I'm a bit confused:
When I run the command on line, it's is working; the same command copied to a bash file doesn't work:
"command not found"

I checked the path by 'which'; with that very path added, bash is working.
But I don't want to add the path each time I use a well known command!
The same path is listed in 'printenv PATH"

command used:

Code:

DEVICE=$(nmcli c show | grep 'Wired connection 1' | awk '{print $6}')
I have the same problem with 'cat', 'grep', 'awk' ...

What can I do?

regards
Mutli16

Statistics: Posted by Mutli16 — Sun May 18, 2025 2:30 pm



Viewing all articles
Browse latest Browse all 3546

Trending Articles