I have a list of files in UNIX environment:
I want to add two more column in each files for all rows.
Assume that I have 7 csv files (could be more or less)
Each files contain below nomenclature:
123;Peter;loaisa;45678998;
145;Jhon;Stugard;654123;
I would like to add info like this:
123;Peter;loaisa;45678998;09/12/2105;filename.csv
145;Jhon;Stugard;654123;09/12/2105;filename.csv
where the value "09/12/2105" is the date of the system with this format, and the value "filename.csv" is the name of the file.
To add these columns in each file I'm using the nex below command:
sed -i "s|$|;09/12/2015;ta_55eed97631073.csv|" ta_55eed97631073.csv
But I need to execute previous command for each file that I have in my folder, and sometimes there are a lot of files.
It's possible to modify this command to get the info of the date and file name from the O.S. and assign to this command? Or is there other way to do it?