Pop up messages on executing a keyword


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Pop up messages on executing a keyword
# 1  
Old 04-20-2012
Pop up messages on executing a keyword

Hey there,

I have the below situation, hope you guys should help me. When i type a keyword on command line, the console should return me some information that i already have.
Say, i give the keyword MERGE, the command line in return should give me "Do this if you need trivial merge OR Do that for non trivial merge".
Its a kind of help message that i wish to populate when a keyword is typed on command line. Any suggestions is appreciated.
Thanks.
# 2  
Old 04-20-2012
I think you want an alias.

In your login directory (home directory) edit .profile (or .bashrc if you use bash)
let's assume merge is a real command on your system already:
Code:
/home/nmattam/merge.sh

Add this to .profile:
Code:
alias merge='echo "do this do that" &&  /home/nmattam/merge.sh'

If you ONLY want the echo
Code:
alias merge='echo "do this do that"'

The command
Code:
alias

shows your existing alias entries.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Search for a Keyword in file and replace another keyword or add at the end of line

Hi I want to implement something like this: if( keyword1 exists) then check if(keyword2 exists in the same line) then replace keyword 2 with New_Keyword else Add New_Keyword at the end of line end if eg: Check for Keyword JUNGLE and add/replace... (7 Replies)
Discussion started by: dashing201
7 Replies

2. UNIX for Dummies Questions & Answers

rsh pop up

Hi All I am using Rsh (i know yuk, but i have know choice) i would like a way to know if someone has RSH'd into my machine, some sort of pop up box maybe?? thanks (0 Replies)
Discussion started by: ab52
0 Replies

3. AIX

HACMP pop quiz

Hi all, A pop quiz is being organized in my project and I've been appointed as one of the quiz-masters. This is a sample of what we are bringing forth. Feedback is welcome. 1)Name 2 commands used to display cluster state, but doesn't use the clinfoES daemon: a) ... (0 Replies)
Discussion started by: themetalingus
0 Replies

4. Solaris

Pop up messages !!!!

Dears, Can you please help me regarding pop up messages !!!! I want system to display a pop up message for all the users connected to the system when /var size reach more the 80%. This message should appears once in an hour. Thanks for your help. (5 Replies)
Discussion started by: Danish Shakil
5 Replies

5. Shell Programming and Scripting

Pop up messages !!!!

Dears, Can you please help me regarding pop up messages !!!! I want system to display a pop up message for all the users connected to the system when /var size reach more the 80%. This message should appears once in an hour. Thanks for your help. (1 Reply)
Discussion started by: Danish Shakil
1 Replies

6. Solaris

Pop up Window Properties

Hi, I have been tasked to migrate a test package my company developed from a Solaris 4 O/S to a new machine running Solaris 8. After many tweaks to paths etc we finally got it running but we have one problem which I am unable to solve. While the application is running a user selected menu... (0 Replies)
Discussion started by: JustinPyfrom
0 Replies

7. Web Development

Pop up Confirmation Box

Hi, I was writing a simple web application using Perl -CGI. When users try to do some operations, I wanted like a pop-up confirmation box. Is this possible with Perl-CGI? Thanks in advance. Regards, garric (6 Replies)
Discussion started by: garric
6 Replies

8. Linux

Pop error msg

mit@mydomain.com here is the latest error message: There was a problem logging onto your mail server. Your Password was rejected. Account: 'mit@mydomain.com', Server: 'mail.mit.com', Protocol: POP3, Server Response: '-ERR Logon failure: unknown user name or bad password.', Port: 110,... (2 Replies)
Discussion started by: naik_mit
2 Replies

9. UNIX for Dummies Questions & Answers

pop

Dear guys , I have Sun mail server ( unix 5.7 ) , I configured the sendmail on it , and it is working fine . i was checking ( smtp and pop ) on it . for smtp , i telnet IP address of server on port 25 and i got a reply . for pop , i telnet IP of server on port 110 and i got the follwoing... (3 Replies)
Discussion started by: tamemi
3 Replies

10. UNIX for Dummies Questions & Answers

xterm pop-out

Good day! We're working on a project using SUN Solaris UNIX. The project requires that based on a text file containing different dates, an xterm window will pop-out and display a simple message. We've already tried running this by including it in the cronjob but doesn't seem to work. Is there... (1 Reply)
Discussion started by: jfsuminist
1 Replies
Login or Register to Ask a Question