I've just added a .profile to my bash shell. However, I've noticed the error "-bash: print: commant not found" keeps on appearing even if you are changing to a valid directory. My .profile just contains a few exports.
[rob@mypc:/home/rob]cd apps
-bash: print: command not found
[rob@mypc:/home/rob/apps]cd util
-bash: print: command not found
[rob@mypc:/home/rob/apps/util]
Can anyone point out why this error keeps on showing?
Sometimes when you try to use a command and Bash displays the "Command not found" error, it might be because the program is not installed on your system. Correct this by installing a software package containing the command.
After typing in this program in your Bash file, you need to save it by pressing Ctrl +S and then close it. In this program, the echo command and the printf command is used to print the output on the console.
$() means: "first evaluate this, and then evaluate the rest of the line". Ex : echo $(pwd)/myFile.txt. will be interpreted as echo /my/path/myFile.txt. On the other hand ${} expands a variable.
Check the output of:
echo $PROMPT_COMMAND
it might give some clues, or else you might have cd aliased to something, so check the output of:
alias
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With