As we process our csv data, we generate a lot of output files with 30 000 lines in each one of them. They all have the same columns/fields. They are all also in csv format and we put them into the same folder on the Linux server. The files are uniquely named using a combination of date, time and numeric digits. See below.
AB_20151127_120000_0_SEGMENT_FINAL.csv AB_20151127_120000_1_SEGMENT_FINAL.csv AB_20151127_120000_2_SEGMENT_FINAL.csv AB_20151127_120000_3_SEGMENT_FINAL.csv . . . AB_20151127_120000_599_SEGMENT_FINAL.csv
So now we need to merge/join all of them into one big file called:
AB_20151127_120000_SEGMENT_FINAL.csv (note the missing numeric digits from the merged file)
awk as below but it is not working. Please tell me what I did wrong.
awk '"AB_20151127_120000_" NR-1 "_SEGMENT_FINAL.csv"' > AB_20151127_120000_SEGMENT_FINAL.csv