ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General Discussion » is there AIX question

Post new topic  Reply to topic
 is there AIX question « View previous topic :: View next topic » 
Author Message
jeevan
PostPosted: Fri Jan 27, 2006 12:22 pm    Post subject: is there AIX question Reply with quote

Grand Master

Joined: 12 Nov 2005
Posts: 1432

I am impatientionately looking for a ways to invoke previous command in AIX. I know this is not a proper forum but can someone tell me how I can do that. I tried with exc k and pressing r. but these are not userfriendly as in dos which can be invoked with up arrow. Is there a way to do that?

thanks
Back to top
View user's profile Send private message
wschutz
PostPosted: Fri Jan 27, 2006 12:35 pm    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Sure, install a bash shell.
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
jeevan
PostPosted: Fri Jan 27, 2006 12:42 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Nov 2005
Posts: 1432

how? do I need to do whole thing? I am not an admin guy and they are very restrictive. Cannot I do that simpley manner?

thanks
Back to top
View user's profile Send private message
csmith28
PostPosted: Fri Jan 27, 2006 12:47 pm    Post subject: Reply with quote

Grand Master

Joined: 15 Jul 2003
Posts: 1196
Location: Arizona

(Move) This was not MQ Related.
_________________
Yes, I am an agent of Satan but my duties are largely ceremonial.
Back to top
View user's profile Send private message
wschutz
PostPosted: Fri Jan 27, 2006 12:48 pm    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

What shell are you running? (echo $SHELL) I think ksh might support arrow keys, but I'm not certain
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
jefflowrey
PostPosted: Fri Jan 27, 2006 12:48 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

KSH does not have the up-arrow set as a command for retrieving commands from history.

There are ways in unix shells to specify your own key-bindings. In ksh, particularly, you could go into emacs mode and then specify an emacs key binding to map the up arrow to the command you wanted.

But in the long run, it's probably going to be easier for you to learn the predefined key for the ksh mode you like - vi or emacs - and use that.

Because you'll have to define this custom key-binding on every ksh machine you ever use, and you'll have trouble doing normal things until you have done that. So it will save you time and effort to learn the "normal" way of doing it.

But Bash is a better shell than Ksh. So you could do some searches in Google for installing unix stuff in your home directory and then find a version of bash that might run in your home directory and try that.

But shells might need to be installed by root. In which case, you're stuck having to ask your admins.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
csmith28
PostPosted: Fri Jan 27, 2006 12:49 pm    Post subject: Reply with quote

Grand Master

Joined: 15 Jul 2003
Posts: 1196
Location: Arizona

Recent related thread.

http://www.mqseries.net/phpBB2/viewtopic.php?t=26760&highlight=aix
_________________
Yes, I am an agent of Satan but my duties are largely ceremonial.
Back to top
View user's profile Send private message
csmith28
PostPosted: Fri Jan 27, 2006 12:53 pm    Post subject: Reply with quote

Grand Master

Joined: 15 Jul 2003
Posts: 1196
Location: Arizona

jefflowrey wrote:
KSH does not have the up-arrow set as a command for retrieving commands from history.


True ksh does not have an up arrow but if you do the following upon login.

Code:
# ksh
# set -o vi
# stty erase ^?


This allows you to use the Esc-k key combination to recall the last command from your .sh_history. Continuing to type the k key moves you one command at a time backward in the .sh_history. The j will move you forward.

set -o vi lets you use vi commands to edit the command line

stty erase ^? sets the backspace key to work.
_________________
Yes, I am an agent of Satan but my duties are largely ceremonial.
Back to top
View user's profile Send private message
wschutz
PostPosted: Fri Jan 27, 2006 12:56 pm    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Quote:
But in the long run, it's probably going to be easier for you to learn the predefined key for the ksh mode you like - vi or emacs - and use that
IMHO, anyone working on a unix system should at least know the fundamentals of "vi". Its a good thing to learn
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
fjb_saper
PostPosted: Sat Jan 28, 2006 11:24 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

And keep in mind that the bash shell might already have been installed on the machine.

see /usr/bin/bsh


_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Sat Jan 28, 2006 6:52 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

wschutz wrote:
Quote:
But in the long run, it's probably going to be easier for you to learn the predefined key for the ksh mode you like - vi or emacs - and use that
IMHO, anyone working on a unix system should at least know the fundamentals of "vi". Its a good thing to learn


Well.

At least, in most cases, it's easier than emacs. In My, well, not so humble, opinion. But on the other hand, I know that emacs has mechanisms for setting key-bindings, and I haven't gone that deep into vi.

I can do what I need to do with Vi, and everything else is solved by X-windows or sftp.....
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
csmith28
PostPosted: Sat Jan 28, 2006 7:16 pm    Post subject: Reply with quote

Grand Master

Joined: 15 Jul 2003
Posts: 1196
Location: Arizona

wschutz wrote:
Quote:
But in the long run, it's probably going to be easier for you to learn the predefined key for the ksh mode you like - vi or emacs - and use that
IMHO, anyone working on a unix system should at least know the fundamentals of "vi". Its a good thing to learn


+1

vi is native to almost if not all Unix Operating Systems. One you know vi you really don't need to know any other Unix editor.
_________________
Yes, I am an agent of Satan but my duties are largely ceremonial.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » is there AIX question
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.