Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I already have the \"employees\" file in my bin. I just need help sorting it now

ID: 3672741 • Letter: I

Question

I already have the "employees" file in my bin. I just need help sorting it now. I am unsure of where to include the file name and the DEPARTMENT in my commands. Here is the assignment:

Use the employees file to create output where the employees are from DEPARTMENT 100 only, the number of years_employed has been increased by 1 year and the file is in sorted order. The format of the output should be close to the above, The content must match exactly.

The bottom section is what everything should look like. The professor really wants us to use awk and sort. Thank you for all of your help.

Explanation / Answer

first way:

$ sort employees

$ awk '{print $1 " " $4}' employees.txt // the picture is not visible..you can replace values of column numbers as per your requirement..

Second way:

$ awk '{print $1 " " $4}' | sort employees.txt //pipe can be used