| Author | Message | 
		
		  | amateur10 | 
			  
				|  Posted: Tue Jan 24, 2006 1:46 pm    Post subject: AIX help |   |  | 
		
		  | Centurion
 
 
 Joined: 23 Nov 2005Posts: 102
 
 
 | 
			  
				| Hi 
 I am new to AIX.  I could not find a simple command to set history of command.  that means I can not repeat the previous command which I believe can be done.  Can some one help me
 
 thanks
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | mvic | 
			  
				|  Posted: Tue Jan 24, 2006 2:31 pm    Post subject: Re: AIX help |   |  | 
		
		  |  Jedi
 
 
 Joined: 09 Mar 2004Posts: 2080
 
 
 | 
			  
				| 
   
	| amateur10 wrote: |  
	| I could not find a simple command to set history of command.  that means I can not repeat the previous command which I believe can be done.  Can some one help me |  There's going to be a variety of ways of doing this.  Supposing you're already running Korn shell I would say:
 
 and then Ctrl+P will bring back the last command.  Or you can say:
 
 and then Esc K will bring back the last command (that's press Esc, release Esc, press K, release K).
 
 If you're not running Korn shell I recommend
 
 
   
	| Code: |  
	| exec /usr/bin/ksh -o emacs |  or
 
 
   
	| Code: |  
	| exec /usr/bin/ksh -o vi |  and then, respectively, one can use Ctrl+P or Esc K to get the last command.
 
 Might I suggest a quick trawl of the web for a subject like this - you should easily find everything you need much quicker than posting and waiting for answers here.
 
 Kind regards
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | csmith28 | 
			  
				|  Posted: Wed Jan 25, 2006 4:53 pm    Post subject: |   |  | 
		
		  |  Grand Master
 
 
 Joined: 15 Jul 2003Posts: 1196
 Location: Arizona
 
 | 
			  
				| # ksh # set -o vi
 # stty erase ^?
 
 Then you can us Esc-k to move backward in you .sh_history.  The j key will move you forward and you can use normal vi commands to edit the line.
 _________________
 Yes, I am an agent of Satan but my duties are largely ceremonial.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | EddieA | 
			  
				|  Posted: Thu Jan 26, 2006 10:36 am    Post subject: |   |  | 
		
		  |  Jedi
 
 
 Joined: 28 Jun 2001Posts: 2453
 Location: Los Angeles
 
 | 
			  
				| But, unfortunatly, there doesn't appear to be any way of recalling commands once you're running runmqsc.  Hello, IBM.      Can you please (pleading) do something about this. 
 And I don't need the suggestions of piping the commands into runmqsc each time.  I want to navigate around once I'm in there, not launch it every time.
 
 Cheers,
 _________________
 Eddie Atherton
 IBM Certified Solution Developer - WebSphere Message Broker V6.1
 IBM Certified Solution Developer - WebSphere Message Broker V7.0
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | csmith28 | 
			  
				|  Posted: Thu Jan 26, 2006 11:08 am    Post subject: |   |  | 
		
		  |  Grand Master
 
 
 Joined: 15 Jul 2003Posts: 1196
 Location: Arizona
 
 | 
			  
				| 
   
	| EddieA wrote: |  
	| But, unfortunatly, there doesn't appear to be any way of recalling commands once you're running runmqsc.  Hello, IBM.      Can you please (pleading) do something about this. 
 And I don't need the suggestions of piping the commands into runmqsc each time.  I want to navigate around once I'm in there, not launch it every time.
 
 Cheers,
 |  
 Where do you want to navigate to or from once you are in mqsc?  It's not like you have a directory structure...
   
 Yeah, I've always wondered about that but have surrendered to using
 
 
 
   
	| Code: |  
	| echo "dis ql(*)" | runmqsc |  
 in Unix or
 
 
 
   
	| Code: |  
	| echo dis ql(*) | runmqsc |  
 in DOS.
 
 In Unix I have found vi command line editing to be a very useful tool for much more than command recall.  Throwing in greps etc. for example
 
 
 
   
	| Code: |  
	| echo "dis chs(*)" | runmqsc | grep RUNNING | wc -l |  will show you many Channels you have in a RUNNING status or
 
 
 
   
	| Code: |  
	| echo "dis chs(APPCHL.NAME)" | runmqsc | grep CONNAME > appchl.out |  
 will create a file that I can use to figure out how many channels call APPCHL.NAME are active and from what hosts they are connected from.
 _________________
 Yes, I am an agent of Satan but my duties are largely ceremonial.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | vennela | 
			  
				|  Posted: Thu Jan 26, 2006 11:27 am    Post subject: |   |  | 
		
		  |  Jedi Knight
 
 
 Joined: 11 Aug 2002Posts: 4055
 Location: Hyderabad, India
 
 | 
			  
				| With V6 you don't have to use as many greps as you have to with earlier versions |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | csmith28 | 
			  
				|  Posted: Thu Jan 26, 2006 11:42 am    Post subject: |   |  | 
		
		  |  Grand Master
 
 
 Joined: 15 Jul 2003Posts: 1196
 Location: Arizona
 
 | 
			  
				| 
   
	| vennela wrote: |  
	| With V6 you don't have to use as many greps as you have to with earlier versions |  
 I downloaded the v6 Beta release and installed it on my personal laptop and played around with it a little but I don't have a Unix Lab Server to play with at work.
 
 Once we've finished upgrading to AIX5.2 and Window2003 Server I'm planning to upgrade all my Servers at work.
 _________________
 Yes, I am an agent of Satan but my duties are largely ceremonial.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |