Solved

Create an Alias

Posted on 2004-08-22
2
283 Views
Last Modified: 2010-04-21
I am trying to create an alias so that I can type "gm" and send a message to my boss. I generally type the command mail -s "Good Morning Brent!". What should I do to create this alias. Please explain it step by step so it is easy for me to understand. I tried to find answers but i was unsuccessfull.
0
Comment
Question by:aahlawat
2 Comments
 
LVL 38

Expert Comment

by:yuzh
ID: 11866646

alias gm       'mail -s "Good Morning Brent!" boss@somewhere'

man alias
to learn more details

you might have to use mailx instead of mail:

alias gm       'mailx -s "Good Morning Brent!" boss@somewhere'
0
 
LVL 48

Accepted Solution

by:
Tintin earned 500 total points
ID: 11866708
The alias syntax varies slightly on what your default shell is.  If you use csh, then use the syntax yuhz gave, otherwise do

alias gm='mail -s "Good Morning Brent!" boss@somewhere'

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question