The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
SunOS 5.10 - VI Arrow keys not working ravashingravi UNIX for Dummies Questions & Answers 3 04-03-2008 08:50 PM
How to read arrow keys on really old bash? simonb Shell Programming and Scripting 1 05-01-2006 07:27 AM
how do I get my arrow keys to work for looking thru my PREVIOUS UNIX COMMANDS spotnis UNIX for Dummies Questions & Answers 11 09-13-2005 10:22 PM
arrow keys / special keys raguramtgr UNIX for Dummies Questions & Answers 3 02-19-2004 10:45 PM
Trapping Arrow keys nageshrc Shell Programming and Scripting 1 11-30-2001 11:36 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-04-2008
Registered User
 

Join Date: Mar 2006
Posts: 41
Using arrow keys

Hello,

I am unable to use the arrow keys in some applications. For example, in bash, I am able to use the arrow keys to to go back and forth characters in current line and search the history--I can do everything you'd expect to be able to do with the arrow keys. However, in bc, I cannot use the arrow keys. Instead I get "^[[A", "^[[B", etc. I get the same result in the python shell. I gnome-terminal, and I don't see any options to modify this behaviour. I get the same behaviour in dtterm and xterm. Any ideas? I'm using 5.10.

Thanks.

Last edited by cooldude; 06-04-2008 at 02:11 PM.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 06-05-2008
Registered User
 

Join Date: Dec 2007
Location: Paris
Posts: 302
bc doesn't support arrows and history.

Use GNU bc for that feature, eg. gbc from blastwave.
Reply With Quote
  #3 (permalink)  
Old 06-05-2008
Registered User
 

Join Date: Mar 2006
Posts: 41
I think I am:
$ bc -v
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.

This is the same version that exists on a NetBSD box, and I am able to use the arrow keys.

I've used Python on other platforms (Linux, NetBSD), and I am able to use the arrrow keys to back and forth through the history and current command.
Reply With Quote
  #4 (permalink)  
Old 06-12-2008
Registered User
 

Join Date: Mar 2006
Posts: 41
Apparently the version of Python I have was not compiled with the readline library: A. Interactive Input Editing and History Substitution . My sysadmin isn't willing to recompile Python.
However, I can compile GNU bc locally. When I compile bc with the readline option, I get the following message:
Code:
./configure --with-readline
...
checking for readline in -lreadline... (cached) no
When I go through the Makefiles, I see no reference to readline. I have readline installed in /usr/local/lib:
Code:
ls *readline*
libreadline.a     libreadline.so    libreadline.so.4
Reply With Quote
  #5 (permalink)  
Old 06-13-2008
Registered User
 

Join Date: Mar 2006
Posts: 41
This doesn't seem to be a Sun Solaris issue. Can this be moved to the Dummies forum?
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 07:06 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0