AIX bash history recall


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers AIX bash history recall
# 1  
Old 10-21-2009
AIX bash history recall

Is it possible to use the keyboard UP ARROW in place of [esc]k to recall history? If so, how/what do I need to do change terminal emulation, etc.?

TIA,
George
# 2  
Old 10-22-2009
yes. don't set -o vi and that should do it.
# 3  
Old 10-27-2009
Nope that doesn't do it.
# 4  
Old 10-28-2009
Hi.

Saying:
Quote:
Originally Posted by gwfay
Nope that doesn't do it.
is not very definitive. For example, what did it seem to do? Was anything else affected?

On a machine running:
Code:
OS, ker|rel, machine: AIX, 1, 000641284C00

my experience is that, for Gnome terminal doing an ssh to the remote machine and running there in bash:
Code:
set +o vi

turns off the arrow feature, resulting in a display like:
Code:
^[[A^[[A

whereas:
Code:
set -o vi

enables the arrow function.

However, there are many variables that might come into play here, settings from stty, the terminal emulator you are using, and so on.

Good luck ... cheers, drl
# 5  
Old 11-02-2009
issuing command set -o vi enables recall using [esc]k, but not the keyboard arrows. Without issuing the cmd there is NO recall. system is AIX 5.3 & putty emulator. It doesn't matter which terminal option I emulate, all give the same response.
# 6  
Old 11-03-2009
Hi.

I cannot easily get to the aix system from a putty client. However, we might be able to whittle down the number of possible issues. Please post the results of these commands from the prompt (the dollar is the prompt for me). After the command are listed the responses I get:
Code:
$ ps | grep $$
 33228  pts/5  0:00 grep 42706 
 42706  pts/5  0:00 -bash

Code:
$ uname -a
AIX aix 1 5 000641284C00

Code:
$ bash --version
GNU bash, version 3.00.16(1)-release (powerpc-ibm-aix5.1)
Copyright (C) 2004 Free Software Foundation, Inc.

Code:
$ echo $TERM
xterm

Code:
(enter the up arrow followed by the down arrow)
$ ^[[A^[[B

cheers, drl
# 7  
Old 11-09-2009
ps | grep $$
50834 pts/0 0:00 grep 52940
52940 pts/0 0:00 -ksh

uname -a
AIX DCHS-PINT-002 2 5 00C5D86F4C00

echo $TERM
xterm

the up & down arrows merely result in 2 beeps. I set the TERM variable to vt100 which was what my putty session was set to but that didn't change anything.

I also discovered that the system is running ksh natively NOT bash.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. OS X (Apple)

I have a backdoor in my OS X? This is what I found in my bash history

That's what appears at the beginning of my bash history (when you type "open .bash_history" in terminal) sudo -k export PS1="";sudo echo AUTHENTICATED;echo RETRY exit export PS1="" sudo echo AUTHENTICATED ; sudo -k ; echo AUTHENTIKILL ; echo PROCESSEDAUTHENTICATION sudo ls;sudo -k;exit;echo... (1 Reply)
Discussion started by: jonathansmith
1 Replies

2. Shell Programming and Scripting

Increase bash history size

Hi I am trying to increase the number of commands recorded in my .bash_history file. I followed what is indicated and have add to my .bashrc export HISTCONTROL=ignoreboth export HISTSIZE=1000000 export HISTFILESIZE=1000000 export HISTIGNORE='ls'but the .bash_history only contains 690... (5 Replies)
Discussion started by: louisJ
5 Replies

3. AIX

How to enable command history in AIX 6

Hi Friends, I am using AIX 6 with ksh shell, i am not able to get the commands histroy which was used earlier by pressing up and down arrow keys. Could you please help me to enable the history for ksh shell in AIX 6 OS. Thanks in Advance. Siva Kumar. (3 Replies)
Discussion started by: sivakumarl
3 Replies

4. Shell Programming and Scripting

export bash history to file

Hi, I want to export bash history to a file, I used the following command history > /home/administrator/bashHistory But the exported file only contains commands with line number from 996 to the last one, How to export all the commands including commands before line 996? Thanks a lot.... (2 Replies)
Discussion started by: Roy987
2 Replies

5. Shell Programming and Scripting

bash history buffer cache

Moderators, Please excuse if I am in the wrong section. I have a question that someone may know the answer to. We know that a current bash shell keeps a record of all commands in a buffer. When the shell is terminated this buffer is written out to ~/.bash_history for the user. I know... (2 Replies)
Discussion started by: jaysunn
2 Replies

6. Shell Programming and Scripting

History for custom BASH function

Hello all, I have a bash function that opens Safari (I'm on OS X) with a specified argument. Here it is : function safari { #Safari bash function TLDS=( "http://www." ".com" ".org" ".net" ".gov" ".edu" ) if ; then open -a Safari ${TLDS}$2${TLDS} elif ; then open -a Safari... (0 Replies)
Discussion started by: inquen
0 Replies

7. AIX

turn on aix history command

how do i turn on aix43 history command? so that i could recall the command with <esc>+k. thanks (3 Replies)
Discussion started by: itik
3 Replies

8. Shell Programming and Scripting

Command history in AIX

Hi All, I would like to know how to get the command history from the prompt. For example in dos, if we hit the Up Arrow, we get the previous command. I am not getting this in my telnet session (AIX) at the prompt. I know that if I type history command it will give a list of cammands I typed... (2 Replies)
Discussion started by: priya_v111
2 Replies

9. Shell Programming and Scripting

Mimic bash history behavior

Does anyone know of a way to mimic the up arrow/down arrow type bash behavior within a shell script? Say I have a scripted menu, and would like to be able to up arrow to bring up the last X number of lines of user input? Thanks to anybody with a suggestion. :) (0 Replies)
Discussion started by: sysera
0 Replies

10. UNIX for Dummies Questions & Answers

ksh: how to make [up arrow] recall command history

I want to get my up arrow key to recall my previous commands in Korn shell. Anyone help please? thanks a bunch! BG (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies
Login or Register to Ask a Question