Bind keys using unix


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Bind keys using unix
# 15  
Old 09-20-2011
BTW
SunOS = the OS (means now solaris...)
pinotgris = Host name
5.10 = OS version (Solaris 10)
Generic_138888-03 sun4v sparc SUNW,SPARC-Enterprise-T5220 = Architecture and box model...
This User Gave Thanks to vbe For This Post:
# 16  
Old 09-20-2011
Typed ksh then echo $0 came back with the message ksh

Then typed alias pq="1" and nothing happened agian, but typed alias pq="<1>" and it came back saying invalid alias name

---------- Post updated at 03:56 PM ---------- Previous update was at 03:55 PM ----------

Quote:
Originally Posted by vbe
BTW
SunOS = the OS (means now solaris...)
pinotgris = Host name
5.10 = OS version (Solaris 10)
Generic_138888-03 sun4v sparc SUNW,SPARC-Enterprise-T5220 = Architecture and box model...

Thank you Smilie) I'm afraid this is all terribly new to me! Smilie
# 17  
Old 09-20-2011
This is how alias works in csh:
Code:
% alias pq "ls -l"
% pq
...
-rw-r--r--  1 user users     32768 Sep  7  2010 acer-boot
-rw-r--r--  1 user users         0 Apr  8  2010 anemone-grab.pcap.gz
drwxr-xr-x 22 user users      4096 Sep  9 15:32 archive
drwxr-xr-x  6 user users      4096 Sep 14 10:17 asdf
-rw-r--r--  1 user users    607731 Sep 29  2008 asus-aml.img.gz
drwxr-xr-x  3 user users      4096 Jan 17  2011 aurora
-rw-r--r--  1 user users     34300 Feb 22  2011 aurora-0.2.tar.gz
-rw-r--r--  1 user users     59995 Feb 24  2011 aurora-0.3.tar.gz
-rw-r--r--  1 user users   3514745 Nov 26  2006 awful.mp3
drwxr-xr-x  2 user users      4096 Dec  2  2010 awksplit
-rw-r--r--  1 user users     46670 Feb  3  2009 b8-0.4.4.tar.gz
-rw-r--r--  1 user users      5415 May 12  2010 bash-log
-rw-r--r--  1 user users     61345 Dec 15  2010 bash.log
-rwxr-xr-x  1 user users    667532 Jul 15  2010 bashold
-rw-r--r--  1 user users       817 Oct 19  2010 baud
...
% pq asus-aml.img.gz
-rw-r--r-- 1 tyler users 607731 Sep 29  2008 asus-aml.img.gz
%

So you can do
Code:
% alias v18 "verbatim18 centres_show"
% v18 optional_ending
(whatever the verbatim18 command does)
%

Run alias once and the alias should remain with you until you quit.

Add the line to your ~/.profile and it will be run on login so you don't have to.
This User Gave Thanks to Corona688 For This Post:
# 18  
Old 09-20-2011
Usually aliases is for command shotcuts as for the first example of corona688 (Thanks BTW for joining, Im hopeless when I see csh...)
so if it just to display some string (a suite of char or words...) the command would be echo
This to say, what are you trying to do, for just displaying on your screen seems silly to me I am sure you want it for something else...
# 19  
Old 09-20-2011
I am equally useless with csh, I just happened to have one installed, and banged on it like an army of monkeys until I found the magic combination that worked Smilie
# 20  
Old 09-20-2011
Do I have to type in all of that code between ... and ... or just the first and last bit? (sorry to be obtuse!)
# 21  
Old 09-20-2011
I let corona give you the csh version Smilie
The idea so you understand what we are trying to show you is, if you are for meSmilie still in ksh:
type
Code:
ls -lt

it will display the content of your directroy sorted by time...
now type
Code:
which lst

just to be sure its not already used...
so we create the alias:
Code:
alias lst='ls -lt'

and you can now test:
Code:
lst

which should give you the same as typing the first command
This User Gave Thanks to vbe For This Post:
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Bind

Hi All I need to do bind of exiting filesystem to new storage allocated mount --bind /prod/OpenCSS /var/lib/test echo "/prod/OpenCSS /var/lib/pgsql bind bind 0 0" >> /etc/fstab will this command just work ? (2 Replies)
Discussion started by: anil529
2 Replies

2. UNIX for Dummies Questions & Answers

Can't bind to IP

When you get the message can't bind to ip already in use. is there a command to search to see everything that is using that IP? I've already check the host and hostname files (2 Replies)
Discussion started by: mchelle_99
2 Replies

3. UNIX for Dummies Questions & Answers

SFTP - UNIX to Windows without keys

When I try to SFTP from our UNIX box to an outside vendor using passwords - no keys, I am immediately get disconnected. We have the FIREWALL open because I get prompted for the password. Here's the error: sftp userid@sftp.test.com Connecting to sftp.test.com... userid@sftp.test.com's... (5 Replies)
Discussion started by: blt123
5 Replies

4. Shell Programming and Scripting

What are public keys in ssh and how do we create the public keys??

Hi All, I am having knowledge on some basics of ssh and wanted to know what are the public keys and how can we create and implement it in connecting server. Please provide the information for the above, it would be helpful for me. Thanks, Ravindra (1 Reply)
Discussion started by: ravi3cha
1 Replies

5. Shell Programming and Scripting

sftp from unix to windows using keys

I'm working on setting up an automated script on a unix server to secure ftp (get) a file from a remote host which is a windows server with Vshell . I understand in order for the paswword-less authentication to work , I need to copy the authorization keys of our server(Solaris) to the remote host... (1 Reply)
Discussion started by: thrashers
1 Replies

6. UNIX for Dummies Questions & Answers

How do I set the public keys up correctly for a migration from an HP-UNIX server to I

I am getting the error message "Permission denied (publickey). lost connection" when I attempt to do an scp migration. I know how to generate the public keys in both IIS and UNIX, and I believe they are both suppose to have the same public key - but where are they each suppose to be stored (I... (1 Reply)
Discussion started by: whs2k
1 Replies

7. UNIX for Dummies Questions & Answers

how do I get my arrow keys to work for looking thru my PREVIOUS UNIX COMMANDS

how do I make my arrow keys behave like they are on DOS. ALSO i need editing on command promt like it is on DOS on my UNIX prompt can anyone help pl.. (11 Replies)
Discussion started by: spotnis
11 Replies

8. UNIX for Dummies Questions & Answers

Adding MS 2000 FSMO Roles to Unix Bind

In a Windows 2000 active directory environment (using Unix DNS), is it possible to create entries in Unix Bind to point Microsoft Workstations to specific Microsoft servers, depending on their Microsoft FSMO roles (i.e. Domain Naming Master, PDC Emulator, RID, Infrastructure Master)? In other... (0 Replies)
Discussion started by: breffkin
0 Replies

9. UNIX for Dummies Questions & Answers

arrow keys / special keys

how to use the arrow keys in shell scripting. is there any special synatax / command for this. i just want to use the arrow keys for navigation. replies appreciated raguram R (3 Replies)
Discussion started by: raguramtgr
3 Replies
Login or Register to Ask a Question