java homework
java 程序辅导 Write an bash script named A5_part1.bash which calls an AWK program that performs the following functions.
Part 1 java 程序辅导
Write an bash script named A5_part1.bash which calls an AWK program that performs the following functions.
- It reads as input a comma-separated CSV file named txtwhere each line contains the first name, last name and email address of a person. Fields are separated by comma and all names are expected to be made of characters (no whitespace or special characters permitted), e.g.,
first,last,mail
- If a line contains a comemail address, the script outputs the entire line back with the word “ matched” appended at the end, e.g.,,
Dimitra,Vista,dv35@gmail.com matched
Submit the file A5_part1.bash.
Part 2
Write a Java or Python program that implements the same functionality as in Part 1. If you know both Java and Python, please use Java for this exercise. Java demonstrates the point of this exercise more.
Submit the file A5_part2.java or A5_part2.py.
Part 3 java 程序辅导
Write a bash script named A5_part3.bash that performs the following functions.
- It reads as input a comma-separated CSV file named txtwhere each line contains the first name, last name and userid for each student. Fields are separated by comma and you can assume that there are no whitespace or special characters in the fields, e.g.,
first,last,userid
e.g the input file might be java 程序辅导
Hans,Solo,hs01 Darth,Vader,dv01 Obi-Wan,Kenobi,owk2 … Dimitra,Vista,dv35
- It creates a directory named A5if one does not exist already.
- It clears all contents (deletes everything) inside directory java 程序辅导
- I uses an awk program to create a subdirectory for each student in the student file using first.useridas the subdirectory name. (hint: check out the xargs command)
Submit the file A5_part3.bash.