Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Attention! In the beginning of each program ( Bash script file ) , after # ! / bin / bash line, there should be comments
Attention! In the beginning of each program Bash script file after #binbash line, there should be comments with the authors name and the the purpose of the script. Up to points will be subtracted from your score for each part of the project if you dont include this information.
points Write a Bash shell script named move.sh
This script will be working with a data file named as the first argument to your script, so you would run it with the command:
movesh someFile.txt
if I wanted it to work with the data inside the file someFile.txt
The ending result will be it producting files, movetxt through movetxt
The data files your script will work with will contain lines in the following format:
Jane Smith$$$
Mark Hauschild$$$
which indicate the amount someone donated in a particular month over a month period
Note that the actual file will contain other names, phone numbers and amounts. You can assume that any names will have a first and last name only, with only alphabetic characters.
I want your script to do the following tasks and save the resulting data in the locations asked.
Note: These tasks do not have to be done in one single command. They can be done in a series of commands working on different files, or piped from one command to another. In fact, I would suggest breaking the task up if that would make some of them easier.
Output the data to a new file, adding a header to it and send that data to a file called movetxt
This head should be as follows:
Name Phone Number Jan Feb Mar
Duplicate the file in a file called movetxt except replace any names of "John" with "Mary"
Put the list of donors only their names, no other data with area code in a file called movetxt
Anyone who's last names start with a M or N should go into a file called movetxt but only their first names.
Find the people who donated at least $ in any month in the file movetxt For this, I just want their full name and phone number, but nothing else. This data should be sorted by their last name.
points for each task finished. Note that you can do each of these tasks in more than one command if you like, but the end result should be the files movetxt movetxt
Am I doing this right?
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