?
Solved

Create an Alias

Posted on 2004-08-22
2
Medium Priority
?
291 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 1500 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

762 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