Write a shell script to send customized mail message to user

Assignment Help Programming Languages
Reference no: EM13948068

Write a shell script to send a customized mail message to the users listed on the command line by login (user) name, only if they are currently logged on. If no users are listed on the command line, an error message should be printed.

In the mail message, the full (real) name from the passwd file (/etc/passwd) should be used. Also, mail should be signed with the real name of the person who is running the script.

Following error message should be printed if an argument username does not exist in the passwd file - "Please send this message to users whom you know personally.".

The mail message should be as follows:

Hello "<INSERT THE ARGUMENT USER'S REAL NAME FROM THE PASSWORD FILE>",

Please ignore this mail. The current time and date is <CURRENT DATE AND TIME>. Have a nice day.

"<INSERT THE SCRIPT RUNNING USER'S REAL NAME FROM THE PASSWORD FILE>"

Reference no: EM13948068

Questions Cloud

The maintenance expenses on a rental house : The maintenance expenses on a rental house you own average $200 a month. The house cost $219,000 when you purchased it four years ago. A recent appraisal on the house valued it at $239,000. If you sell the house you will incur $14,000 in real estate ..
A 500 mg sample containing nacn required 23.50 : A 500 mg sample containing NaCn required 23.50 ml of 0.1255 M AgNO3 to obtain a permanent faint turbidity. Express the result of this analysis as % CN ?
What was done well and what was not done well in each area : What was done well and what was not done well in each area? What were the consequences in each case? What would you differently do the next project?
What is the implicit cost of trade credit under : Book Depot Inc. sells on terms of 2/20, net 75. What is the implicit cost of trade credit under these terms? Use a 365-day year. Correct answer (13.54)% Please explain Pets Store Inc. sells on terms of 2/15, net 60. What is the effective annual cost ..
Write a shell script to send customized mail message to user : Write a shell script to send a customized mail message to the users listed on the command line by login (user) name, only if they are currently logged on. If no users are listed on the command line, an error message should be printed.
Calculate the drift velocity of electrons : 1. Briefly tell what is meant by the drift velocity and mobility of a free electron.2. (a) Calculate the drift velocity of electrons in silicon at room temperature and when the magnitude of the electric field is 500 V/m.
Evaluate if provincial data converge toward national data : Measure the convergence of annual provincial data relative to the national. I have data for per capita annual income for two provinces and I have to compare them with the per capita national data and evaluate if the provincial data converge toward..
Penetrate the comp-xm market : Suppose you were hired as a consultant for a company that wants to penetrate the Comp-XM market. This company wants to pursue a broad cost leader strategy. from last year's reports which company would be the strongest competitor?
Draw the product expected after an acid : If someone has 13C enriched acetone (ie  (13CH3)2C=0 and treated it with isopropylmagnesium bromide, draw the product expected after an acid workup.

Reviews

Write a Review

Programming Languages Questions & Answers

  Statements to find array elements are null or not

Write down statements needed to find whether any of the array elements are null or refer to the empty String. Set the variable hasEmpty to true.

  Program to enter up to 20 integers in the array of long

Write down a program which asks user in order to enter up to 20 integers in the array of longs.The program must utilize the function Find_It() in order to situate the integer within the array.

  Type of control used in programming

Loop statements are another type of control used in programming that allow programmers to interrupt the structural flow of a program.

  Design gui application with jframe to enter series of names

Design  GUI application with JFrame which permits user to enter series of friends' names and phone numbers. Each time user clicks the button, data entered must be written to sequential access file.

  Discuss how database design and table design

Discuss how database design, table design, and query design affect database performance.

  Create application that uses two-dimensional arrays

Create the application that uses 2-dimensional arrays to keep track of 5 students' grades, with each student having 3 different classes. You require to ask user to enter grade for each of 5 students.

  Program to display contents of file in separate line

Display the contents of the file GRADES created in Problem 1. Each student's record should appear on a separate line and include the total score (the sum of the three tests) for that student.

  Program for saving account balance report

Savings account balance report from customer savings account file. Every input savings account record contains account number, balance forward, deposits (sum of all deposits).

  Create and save a document named design plan pdf

Use the document formatting outlined in the syllabus and create a heading called Design Plan

  Create a document that displays a sports related image

Create a document (with any required style sheets and java .js files) that displays a sports related image of your choice and three buttons. The buttons should be labeled simply 1,2, and 3. When pressed, each button should change the content of th..

  Write a program that uses one of the map classes

Write a program that uses one of the Map classes to implement a contact list. Contact information should include first name, last name, a phone number and an email address

  Write sql to perform the following queries and updates

Retrieve all of your customers' names, account numbers, and addresses (street and zip code only), sorted by account number

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd