Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why do I have an equals sign at the end of my unix prompt? 1

Status
Not open for further replies.

Chrissirhc

Programmer
May 20, 2000
926
GB
I have this in my .mycshrc file I have

#ksh
setenv VISUAL vi
setenv PS1='$HOSTNAME'": "'$PWD'" > "
#setenv PS1='$USER'" on "`hostname`": "'$PWD'" > "
exec ksh -o vi

and my prompt looks like this

servername: /home/username > =

Why do I have an equals sign at the end??

Thanks,

Chris
 
Are you sure this is in your ".mycshrc"? Shouldn't this be in the .profile since you are running ksh not csh? Just a thought.
 
When I log on to the server it automatically set my shell to csh but I updated .mycshrc so that it runs exec ksh -o vi which opens up a new shell within the old one.

One thing I don't get is that there is an = sign in my prompt and I can't see where I specified that.
 
Maybe in your $HOME/.profile or $ENV file ?

Hope This Help
PH.
 
I can't see any of those files in my local area.
 
What is the result of
Code:
 set | grep PS1
?
 
PS1='$HOSTNAME: $PWD > =' is the result, but I greped for PS1 on all .* files in the directory and they don't have this equals sign in it.
 
Its not in there and furthermore this is a root owned file.
 
Is there any other file I could edit so that I don't get this unwanted "=" sign.
 
What happens if you try this in your .cshrc ?
Code:
setenv VISUAL vi
setenv PS1='${HOSTNAME}:${PWD}>'
exec ksh -o vi


Hope This Help
PH.
 
Thanks, however I still get the equals sign...

Any other suggestions?
 
A bit of a guess here, but in csh you don't need an assignment operator when using setenv, so you should be doing
Code:
setenv VISUAL vi
setenv PS1 '${HOSTNAME}:${PWD}>'
exec ksh -o vi
Greg.
 
Hehe :) Greg as soon as I saw your response I felt like thats it and it was :) Thanks a lot.

 
Oh I posted something else about being able to use the delete key and backspace key to both act as delete. Is that possible and can I make that happen at start-up???

Thanks,

Chris
 
As mentioned on the other forum, it depends on whether you're using a terminal emulator or not. I use the simple telnet tool shipped with windows. In my profile the line

stty erase ^H

does this for me. To get the ^H you do Ctrl-V Ctrl-H.

Greg.
 
Thanks,

How would I get both delete key and the backspace key to do the same thing in korn shell? And what file would I need to put it in to get it to work when I log on.

Thanks,

Chris
 
Just a thought:
Code:
setenv PS1='${HOSTNAME}:${PWD}>'
          ^
are you sure you need a equal sign here ?

Hope This Help
PH.
 
You are right. When I take the equals sign away it works. Its because with cshell you don't need it. Just like Greg mentioned.

In another post I asked about getting the delete and backspace key to both delete characters do you know how to do this?

When I type stty erase ^H the backspace key works, but the delete key gives ^?

Thanks in advance,

Chris
 
stty erase ^H sets the backspace key to delete a char. stty erase ^? sets the delete key to delete a char. Using this method you can have one or the other, not both. Is this a causing a problem?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top