Answered step by step
Verified Expert Solution
Question
1 Approved Answer
At the beginning of each program ( Bash script file ) , after the # ! / bin / bash line, there should be comments
At the beginning of each program Bash script file after the #binbash line, there should be comments with the authors name and the purpose of the script. If you don't include this information, up to points will be subtracted from your score for each part of the project. Don't use awk Commands
Write a Bash shell script named transform.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:
transformsh fileNmae.csv
It is just sample data. You can add more data to this sample data. Your script should work for the following format data.
David Lee,$$$
Sophia Smith,$$$
Emily Johnson,$$$
Michael Brown,$$$
Sophia Davis,$$$
Brian Wilson,$$$
Olivia White,$$$
Kevin Miller,$$$
Sophia Taylor,$$$
Andrew Martinez,$$$
Hannah Lewis,$$$
Robert Turner,$$$
Sophia Walker,$$$
Ethan Hall,$$$
Ava Harris,$$$
which indicates the amount someone expenses in three different categories: Expense Expense and Expense
Note that the actual file will contain other names, phone numbers, and amounts. You can assume that any names will have only a first and last name, with only alphabetic characters. I want your script to do the following tasks and save the resulting data in the locations asked.
Output the data to a new file, add a header to it and send that data to a file called movetxt
This head should be as follows: Name Phone Number Expense Expense Expense
Duplicate the file in a file called movetxt except replace any names of "Sophia" with "Sophi"
Put the list of persons only their names, no other data with area code in a file called movetxt
Anyone whose last names start with an A or H should go into a file called movetxt but only their first names.
Find the people who spend at least $ in any category in the file movetxt I just want their full name and phone number, nothing else for this. This data should be sorted by their last name.
Nine points for each task finished. Note that you can do each of these tasks in more than one command if you like, but the result should be the files movetxt movetxt
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.
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