source: main/trunk/model-sites-dev/mars/collect/deam/02-GENERATE-ALL-ESSENTIA-CSV-FEATURE-FILES.sh@ 34435

Last change on this file since 34435 was 34435, checked in by davidb, 4 years ago

Refined CSV foreach to skip metadata.csv files

  • Property svn:executable set to *
File size: 807 bytes
Line 
1#!/bin/bash
2
3
4# essentia-extractor-all-mp3-with-profile.sh import `pwd`/essentia.profile
5
6
7find import -name "*.mp3" -print -exec ./MP3-TO-ESSENTIA-CSV-FEATURE-FILE.sh {} \;
8
9
10if [ -f CSV-CHECK.txt ] ; then
11 echo "**** Not runnign CSV field header check as CSV-CHECK.txt already exits"
12 echo "**** If you want to trigger a check: "
13 echo "**** rm CSV-CHECK.txt"
14 echo "**** Then run again:"
15 echo "**** $0"
16else
17 echo "**** Checking number of fields to CSV files"
18
19
20 for f in import/[0-9]*.csv ; do
21 echo "Checking: $f"
22 wc_output=`head -n 1 $f | tr ',' '\n' | wc`
23 echo "$wc_output $f" >> CSV-CHECK.txt
24 done
25
26fi
27echo
28echo "****"
29echo "* 'wc' count of CSV headers output to: CSV-CHECK.txt"
30echo "* For example:"
31echo "* cat CSV-CHECK.txt | sort | less"
32echo "****"
33echo
Note: See TracBrowser for help on using the repository browser.