tags:

views:

37

answers:

4

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?

A: 

use printf or echo

ghostdog74
+1  A: 

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
Burton Samograd
echo $PROMPT_COMMAND returns an empty string.
jasonline
Then you might have cd aliased, as I said; the other answers about changing print to echo also apply, if you happen to find a print command anywhere.
Burton Samograd
A: 

Look in your .bash_profile and .bashrc and see if anything is using the print command.

jonescb
A: 

Change the occurence of print in ~/.profile, ~/.bash_profile, or /etc/profile (system wide) to echo.

Ruel