Combining and Processing Data
Tasks
- Use the
join
command to combine data from two files: employees.txt
and departments.txt
.
- Process the combined data using
awk
to create a formatted output.
- Sort the output alphabetically by the employee's last name.
Requirements
- All operations must be performed in the
~/project
directory.
- Use the
join
command to combine data from employees.txt
and departments.txt
.
- Use
awk
to format the output.
- The final output should be saved in a file named
employee_departments.txt
.
- The output should be sorted alphabetically by the employee's last name.
Example
Input files (truncated for brevity):
employees.txt
:
1 John Doe
2 Jane Smith
3 Bob Johnson
...
departments.txt
:
1 Sales
2 Marketing
3 Engineering
...
Expected output in employee_departments.txt
(truncated for brevity):
Allen Barbara works in Marketing
Anderson Emily works in Resources
Bailey Michelle works in Marketing
...