Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

migrated from stackoverflow.com Apr 20 '10 at 14:02

This question came from our site for professional and enthusiast programmers.

2 Answers 2

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

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.