You are reading a single comment by @Greenbank and its replies. Click here to read the full conversation.
  • If you know the .csv files are only buried, say, a max of 3 dirs deep then you can just do something like this:-

    awk 'FNR==1,FNR==5 {printf("%s;%s\n",FILENAME,$0)}' *.csv */*.csv */*/*.csv */*/*/*.csv > output.csv
    

    and that avoids a lot of the for/find fuckery.

    (It'll complain to stderr if there are any directories that end in .csv but won't affect the output.)

About

Avatar for Greenbank @Greenbank started