Changeset 34437 for main/trunk/model-sites-dev/mars/collect/deam/03-COLLATE-ALL-CSV-FEATURE-FILES.sh
- Timestamp:
- 2020-10-04T23:33:54+13:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/model-sites-dev/mars/collect/deam/03-COLLATE-ALL-CSV-FEATURE-FILES.sh
r34433 r34437 4 4 for_header_file=import/3.csv 5 5 6 output_csv_file=etc/deam-essentia-features-collated.csv 7 6 8 echo "******" 7 echo "* Outputing CSV headers based on 1st line of $for_header_file to ESSENTIA-FEATURES-COLLATED.csv"9 echo "* Outputing CSV headers based on 1st line of $for_header_file to $output_csv_file" 8 10 9 head -n 1 $for_header_file > ESSENTIA-FEATURES-COLLATED.csv11 head -n 1 $for_header_file > $output_csv_file 10 12 echo "****" 11 13 12 for f in import/ *.csv ; do14 for f in import/[0-9]*.csv ; do 13 15 echo "* Appending CSV features for $f" 14 tail -n 1 $f >> ESSENTIA-FEATURES-COLLATED.csv 16 # Found 'tail -n 1 $f' directly on file for some reason return 2 lines (confirmed with 'wc') 17 # However, operating through 'cat' first, things work as expected 18 cat $f | tail -n 1 >> $output_csv_file 15 19 done 16 20 echo "******"
Note:
See TracChangeset
for help on using the changeset viewer.