The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
ssh keys monitoring tungaw2004 UNIX for Dummies Questions & Answers 0 07-25-2007 04:34 AM
SSH keys new2ss UNIX for Dummies Questions & Answers 1 01-05-2007 09:21 AM
Hot Keys cwtlr UNIX for Dummies Questions & Answers 2 12-01-2006 01:50 PM
SSH Keys Help sysera UNIX for Advanced & Expert Users 1 08-10-2004 03:57 AM
arrow keys / special keys raguramtgr UNIX for Dummies Questions & Answers 3 02-20-2004 02:45 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-06-2006
cwtlr cwtlr is offline
Registered User
  
 

Join Date: Nov 2006
Posts: 7
Hot Keys

I am a new user, using Unix in a DOS window. Can I set up Hot Keys to run a script? Example - A12.1.13.15 aaaaBbbbCccc
Thank you,
cwtlr
  #2 (permalink)  
Old 12-06-2006
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,960
What do you mean by using UNIX in a DOS window? Are you connecting to a shell with ssh or something like that?

I'm not sure I understand your example. You want to type in A12.1.13.15 and have it come out as aaaaBbbbCccc? Try
Code:
$ alias A12.1.13.15="echo 'Hello there'"
$ A12.1.13.15
Hello there
$
  #3 (permalink)  
Old 12-08-2006
cwtlr cwtlr is offline
Registered User
  
 

Join Date: Nov 2006
Posts: 7
hot key

Thanks for your reply.
Many of the commands I use are preceeded with the same series of letter/number combinations. For example "P14.1.166.444 AaaaBbbbCccc". I'm looking for a hot key that I can replace that long letter/number preceeder with.
cwtlr
  #4 (permalink)  
Old 12-08-2006
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,960
Again, alias can do what you want.
Code:
$ alias abc="P14.1.166.444"
$ abc ...
  #5 (permalink)  
Old 12-08-2006
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,960
If you're looking for special key combinations to do that, that's not going to be in the shell, that'd be configured in whatever client program you use to connnect -- your "DOS window", which I'm assuming is actually an SSH window to UNIX. A DOS window would have DOS.
  #6 (permalink)  
Old 12-13-2006
cwtlr cwtlr is offline
Registered User
  
 

Join Date: Nov 2006
Posts: 7
hot key

Thanks for the advise. I guess I don't understand how to use the alias. I'm in the Command Prompt window. I type alias, then a space, then the letter combination that I want to replace my long string with (example - pri=), then the string that I'm replacing, enter. After that, when I type pri it is the same thing as typing the long string that I was using. This doesn't work. Is there a space or other key I'm missing, or did I mis-understand your instruction?
Thanks.
cwtlr
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:17 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0