Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been noticing something weird when typing in commands. This is what I get when I do an ls -la on an empty folder:

sh-3.2# ls -la  
total 0  
drwxr-xr-x   2 root  wheel   68 Apr  2 15:53 .  
drwxr-x---  16 root  wheel  544 Apr  2 15:53 ..  

Why is there an -ne showing up after I type in a command? Any help would be appreciated.

This is what I get when I echo $PS1.


Gordon - This is what I get when I printf "'%q'\n" "$PS1"

'\\s-\\v\\\$\ '
share|improve this question

migrated from Apr 2 '11 at 21:18

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

Better ask on ServerFault or SuperUser – melco-man Apr 2 '11 at 21:03
Show us the contents of your .bashrc and .bash_profile files (if they exist). – Kevin Reid Apr 3 '11 at 0:47
The don't exist – Tom Apr 3 '11 at 2:55
the results you got from the echo were rather hard to parse. Please try printf "'%q'\n" "$PS1" and report the results. – Gordon Davisson Apr 3 '11 at 5:36

The problem was is in .bash_profile. I was given some helper commands to make bash more friendly but these helpers where not designed for a Mac. I should have analyzed those helpers some more.

share|improve this answer

It looks like something in your prompt variable (PS1) could be messed up. What's you prompt set to?

# echo $PS1
share|improve this answer
I added the response to the question. What do I need to to fix it? – Tom Apr 2 '11 at 23:20

I think you need to look at the code that's running for PS1. Check your .bashrc for any line that sets PS1, and see if there is anything that looks like -ne. -ne is bash/ksh/sh/zsh code for 'not equal'. You may have something being set and you forgot the closing quote.

share|improve this answer

You must log in to answer this question.

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