Rearrange columns in csv file using unix
laradd
Question
Using awk or sed or any other command line tool re-arrange a csv file as such
Original data of the csv
head -5 persons_db.csv id, user_id, provider, uid, extra_data 1, 2, 3, 4, 5
Now I need the csv file to be
id, provider, uid, extra_data, user_id, created, modified
so column 3 needs to be made column 2 in the new file, column 4 in the old file is column 3 in the new file, etc and in the new file 2 new columns were added called created and modified. fill those columns with 2021-09-19 00:00:00+00 for every row
Details
Purchase An Answer Below