I don't know, maybe this is a duplicate, but I didn't find any help.
So, the problem. I have a simple problem - I made a script to automate C++ compiling a bit. Well, there's the script.
#!/bin/bash clear PATH="/media/joris/LinuxStuff/C plus plus prog" echo Path is $PATH echo Name of file? read filename echo $PATH/$filename/$filename.cpp echo Compiled file name? read compfilename g++ -o $PATH/$filename/$filename.cpp /media/joris/LinuxStuff/C\ plus\ plus\ prog/$filename/$filename
And this is what I get:
Path is /media/joris/LinuxDomenai/C plus plus prog Name of file? nope /media/joris/LinuxStuff/C plus plus prog/nope/nope.cpp Compiled file name? yes ./comp.sh: line 16: g++: command not found
Edit: if I compile in terminal, it works and which g++ gives me /user/bin/g++