I would like to list last 3 modified files in /user directory , and then cat the result for every file , after the cat would like to awk and print 2 column and pass all the out put to csv file .
for i in $(ls); do cat "$i"; done;
Here will list and cat all the files, but i do not know how to cat just last 3 files
Any idea
Desired result : csv-file
file-name , 1st clom , 3 colm
for i in $(ls); do cat "$i"; done;
Here just cat all the files :(