I'm having some trouble creating a bash/awk/sed script that would take a comma-separated CSV file of three columns (firstname, lastname, date of birth), and outputs another CSV file that has the same columns from input with an additional column that shows the difference between the current date and the date of birth in years.
$ yourscript <input CSV file> <output CSV file>
input.csv may look like this:
bob,wag,06/13/1958
ashley,hay,01/23/1983
evan,bert,09/11/1972$ yourscript <input CSV file> <output CSV file>
output.csv should look like this:
bob,wag,06/13/1958,62
ashley,hay,01/23/1983,37
evan,bert,09/11/1972,48
input.csvmay look like this:bob,wag,06/13/1958 ashley,hay,01/23/1983 evan,bert,09/11/1972output.csvshould look like this:bob,wag,06/13/1958,62 ashley,hay,01/23/1983,37 evan,bert,09/11/1972,48