0

For some reasons i always get the following whenever i log into my terminal:

: command not found
: command not found
: command not found
: command not found
: command not found

It's really a minor problem because everything is working fine, or at least everything what im using in the terminal. Still it would just look nicer without them. Any help?

I'm running Mac OS 10.5.8 <= if this helps solving the problem

2 Answers 2

2

You probably have some garbage in your .login or .profile.

0

Places to look:

  • System shell startup files -- /etc/profile, /etc/bashrc
  • Personal startup files -- $HOME/.profile, $HOME/.bashrc, $HOME/.bash_profile

(this all assumes you're using bash as your shell)

Try running the scripts using the -x option to show the commands and their output to help you identify the troublesome lines:

$  bash -x /etc/bashrc
+ '[' -z '' ']'
+ return
/etc/bashrc: line 3: return: can only `return' from a function or sourced script
+ PS1='\h:\W \u\$ '
+ shopt -s checkwinsize

The lines preceded by + show the commands which will be executed. Output (if any) is shown in between.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .