Question

In UNIX: write a shell script that takes a FileName.awk as an argument. The shell script...

In UNIX: write a shell script that takes a FileName.awk as an argument. The shell script then uses that file name to run your awk script and sort the results alphabetically, by student name.

data.csv

Student,Catehory,Assignment,Score,Possible
Chelsey,Homework,H01,90,100
Chelsey,Homework,H02,89,100
Chelsey,Homework,H03,77,100
Chelsey,Homework,H04,80,100
Chelsey,Homework,H05,82,100
Chelsey,Homework,H06,84,100
Chelsey,Homework,H07,86,100
Chelsey,Lab,L01,91,100
Chelsey,Lab,L02,100,100
Chelsey,Lab,L03,100,100

0 0
Add a comment Improve this question Transcribed image text
Answer #1

If you have any doubts, please give me comment...

awk 'NR>1{print $0|"sort -t',' -nk2 "}' data.csv

Add a comment
Know the answer?
Add Answer to:
In UNIX: write a shell script that takes a FileName.awk as an argument. The shell script...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • UNIX shell script that will create a backup of the file specified as an argument. This...

    UNIX shell script that will create a backup of the file specified as an argument. This backup file will be saved in ~/backups/ with -date appended to the original file name. the date shall be in the form yymmdd:HHmm. Your script should check to make sure the ~/backups/ directory exists before copying files, creating the directory if necessary. Ensure your script will properly accept a file argument with path information and strip any path information prior to copying the file....

  • Write a Unix shell script that takes three integers and sorts them from largest to smallest....

    Write a Unix shell script that takes three integers and sorts them from largest to smallest. An example execution is as follows (assume the name of the script is shs): % shs 3 9 4 The order is: 9 4 3 % shs -1 0 3 The order is: 0 -1 -3

  • UNIX Write and run a simple shell script name mymenu that creates a simple command menu....

    UNIX Write and run a simple shell script name mymenu that creates a simple command menu. The script should present menu items (see below), prompts the user for a selection, and then executes the appropriate command selected. [Submit your script and the results of a test case for a, b, c, and d selections]     COMMAND MENU a. Current date and time b. Name of the working directory c. Contents of the working directory Enter a, b, or c:

  • Write a script using simple shell commands. The script takes a command line argument that specifies...

    Write a script using simple shell commands. The script takes a command line argument that specifies a directory dir. The script first changes directory to dir, then prints the following in sequence: (a) A line starting “Current date and time: ”. Then on the same line, the current time and date. (b) A line starting “Current directory is : ”. Then, on the same line, the absolute pathname of the current working directory. (c) An empty line (d) The line...

  • UNIX QUESTION Write an argument-less shell script "Sum4.csh", which reads four integer values from the keyboard,...

    UNIX QUESTION Write an argument-less shell script "Sum4.csh", which reads four integer values from the keyboard, computes their sum, then displays the sum in expression format. EXAMPLE: % Sum4.csh Enter the first number: 4 Enter the second number: 7 Enter the third number: 3 Enter the fourth number: 11 RESULT: 4 + 7 + 3 + 11 = 25

  • Write a bash shell script, deleteFilesWithZeroLength.sh, that removes all zero length ordinary files in the directory passed as an optional argument. If you do not specify the directory argument, the script uses the present working directory as the defaul

    Write a bash shell script, deleteFilesWithZeroLength.sh, that removes all zero length ordinary files in the directory passed as an optional argument. If you do not specify the directory argument, the script uses the present working directory as the default argument. Do appropriate exception handling in your script such as:If the arguments are more than 1, print out “Too many arguments passed”.If the argument passed is a regular file, print out “XXX is regular file”.1c. If the directory doesn’t exist, print out “Directory...

  • Write a Bash script called move that could replace the UNIX command mv. 'move' tries to...

    Write a Bash script called move that could replace the UNIX command mv. 'move' tries to rename the source file (using the UNIX command mv), but if the destination file exists, appends an index number, a sort of version number, to the destination file. So if the user types: move a.txt b.txt and b.txt already exists, move will rename the file to b.txt.1. If b.txt.1 already exists, move must rename the file to be b.txt.2, and so on, until the...

  • In PERL ***PLEASE DO NOT ASSIST WITH AWK***, generate a report containing the lowest, highest and...

    In PERL ***PLEASE DO NOT ASSIST WITH AWK***, generate a report containing the lowest, highest and average score for each assignment in the data file. The name of the assignment is located in column 3. Output example below: Name Low High Average Q06 77 95 86.80 L05 40 96 46.60 WS 5 5 5 Q07 58 100 78.80 L06 60 99 61 L07 77 86 64.80 H01 19 90 47.80 H02 47 95 74.60 H03 70 95 82.20 H04 46...

  • Unix code problem Write a shell script that does the following : Read many lines of...

    Unix code problem Write a shell script that does the following : Read many lines of text from the standard input device (keyboard) and copy them to the standard output. Precede each output line with a line number Explain all steps

  • PERL SCRIPTING QUESTION / CAN ONLY BE DONE WITH PERL AND ONLY PERL AND JUST PERL...

    PERL SCRIPTING QUESTION / CAN ONLY BE DONE WITH PERL AND ONLY PERL AND JUST PERL ALONE DONE WITH PERL PERL PERL PERL PERL PERL PERL PERL PERL DONE IN PERL PLEASE HELP IN PERL PERL PERL PERL PERL PERL PERL PERL ONE LAST TIME IN PERL PERL PERL PERL ONLY DONE IN PERL HERE IS DATA.CSV Student,Catehory,Assignment,Score,Possible Chelsey,Homework,H01,90,100 Chelsey,Homework,H02,89,100 Chelsey,Homework,H03,77,100 Chelsey,Homework,H04,80,100 Chelsey,Homework,H05,82,100 Chelsey,Homework,H06,84,100 Chelsey,Homework,H07,86,100 Chelsey,Lab,L01,91,100 Chelsey,Lab,L02,100,100 Chelsey,Lab,L03,100,100 Chelsey,Lab,L04,100,100 Chelsey,Lab,L05,96,100 Chelsey,Lab,L06,80,100 Chelsey,Lab,L07,81,100 Chelsey,Quiz,Q01,100,100 Chelsey,Quiz,Q02,100,100 Chelsey,Quiz,Q03,98,100 Chelsey,Quiz,Q04,93,100 Chelsey,Quiz,Q05,99,100 Chelsey,Quiz,Q06,88,100 Chelsey,Quiz,Q07,100,100 Chelsey,Final,FINAL,82,100...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT