Question
Intro to Unix/Linux BASH Script 1. Here is another short BASH script. Use nano or some other simple editor to type it in. This script
Intro to Unix/Linux
BASH Script 1. Here is another short BASH script. Use nano or some other simple editor to type it in. This script demonstrates how to use the /bin/mail program to send email and messages through the Internet. /bin/mail needs to send a file so the mailme program begins by asking you to type a few lines and constructing a file called "themessage" The mailme script then sends this message to your email address on Vader, or if you provide it, another email address. #mailme #Send a short message to an email address #Uses an email address from the command line if it's there, # otherwise constructs an email address from your LOGNAME #Nazaire Biscoe, Spring 2018 if [ "$1" ] then myaddrs=$1 else myaddrs="${LOGNAME}@vader.aacc.edu" fi echo "Message sent $(date)" > themessage # this creates the message file echo "Please type a short message (3 lines max) " for i in 1 2 3 do read line echo $line >> themessage # this adds up to 3 lines to the message file done /bin/mail -s "A short message" $myaddrs < themessage Run this script to make sure it works. Each time you run it use the command alpine to check your mail on Vader. Press i to see the index of your messages, cursor down and press Enter to select one. Press d to delete a message and q to end the Alpine email client. 2. Try using the mailme script to send a message to your cell phone using the address: nnnnnnnnnn@vtext.com (this is for Verizon cell phones) (it's different for other providers) where the 10 ns represent your cell phone number. Rev. 2018-3-19
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started