Zookal
Zookal

We’d love to hear any feedback or comment from you!

© 2011-2021 Zookal Pty Ltd

View question and answer

From our collection of questions and answers
Engineering · Computer Science
Question details

Assignment Goals: To learn to use UNIX/Linux utilities and commands to process data in text files Tasks: 1. In your home directory, make a directory called hw2 and change the current working directory to the hw2 directony 2. Use the vi editor to create a fle named customers which contains the following text (Each line is a record of a customer including customer lD, first name, last name, and emaill- CO1 Naney: Jones:njoneseabe.eom СО 2 ; Barba ra ; Madison: bnadison@bed. СОТ СО 3 ; Tit: Adams ; t adams@ede , com CO4:Sarah:   CO6 Paula1Jacobs :pjacobs8igh.com 3, Use the vi editor to create a file named orders which contains the following text (Each line is a record of an order including order ID, order date, amount, and customer ID): R001:07/04/15:123.4S:co R002:12/20/15:167.50:C03 R003:03/14/16:298.00:CO6 R004:09/15/16:36.50:C03 R005:11/27/16:58.00:C02 RO06:02/28/17:72-98:CO5 4. Use the vi editor to create a script called hw2script and add the following commands into the script file: 4.1) Write commands to combine the customers and orders files and generate a file named customer order that contains customers ID, first name, last name, email, order ID, order date, and order amount Hints: Identify a common field that appears in both files. This will be the field upon which the two files are to be joined. Sort the customers file on the common field and save the sorted result to a new file Sort the orders file on the common field and save the sorted result to a new file. Use the join command to combine the two sorted files upon the common field 2) Write a command to output the contents of the customer order file on the screen Hints: Use the echo command to output a message or an empty ine to make the output nice and 43) Sort the file customer order in the ascending order of the order amount and output the result to a fie named report 44) Write a command to output the contents of the report le on the screen. 45) Use the awk command to output from the file report the customers ID, frss name, last name, order date, and order amount in a neat format on the screen Hints: Use format specifiers such as %-10s or %12s to format the output see Chapter 4 Lecture Notes 4.6) Add a command to output 1 certify that this submission is my own original work-followed by your full name on the screen, S. Add the execute permission to the owner, group, and others for your script file 6. Run your script. The output should be similar to the sample output listed below
Submission: Submit a word or pdf document that includes the following two screenshots 1. A screenshot of the contents of your script file, ie, after running the command 2. A screenshot of the output after running your script file, Le, after executing./hw2script. Vİhw2script or cat hw2script Sample output after executing the script: he cuatomer order ile: 1:Nancy: :RO01:07/04/15:123- 02:Barbara:Hadison:bmadisonßbed.eom:R0o5:11/2/16:58.00 3:Tim: : R002:12/20/15:167.50 3ITINIAdamsitadams8ode.com:R004109/15/16136.50 John: PolkijpolkBefg.COMROO6:02/20/17 72.9 06:Paula:Jacoba:pacobs8fgh.com:R003:03/14/16:298-00 he report Eile :R004:09/15/16:36.50 021Bazbaza:Madison:bmadisonbod.comROOS:11/27/1658.00 CoSiJohn t Polk:polhletg.com R006:02/28/17 72-9 Nancy1 Jonesinjones8ab.COm R001107/04/151123-4 : R002:12/20/15:167-50 06:Paula:Jacoba:piacobs8Egh.com:R003:03/34/36:298-00 The formatced output: 09/15/16 36-50 Barbara Madi.son11/27/16 Tohn 02/28/17 07/04/1 12/20/1S 3/14/16 72-9 123-45 67-50 0 ancy 03 ones Tin Paula certify that this subnission is mny own origisal wozkYour Full Name
Answer
Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.

Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.