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 |
|
---|
7 | find import -name "*.mp3" -print -exec ./MP3-TO-ESSENTIA-CSV-FEATURE-FILE.sh {} \;
|
---|
8 |
|
---|
9 |
|
---|
10 | if [ -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"
|
---|
16 | else
|
---|
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 |
|
---|
26 | fi
|
---|
27 | echo
|
---|
28 | echo "****"
|
---|
29 | echo "* 'wc' count of CSV headers output to: CSV-CHECK.txt"
|
---|
30 | echo "* For example:"
|
---|
31 | echo "* cat CSV-CHECK.txt | sort | less"
|
---|
32 | echo "****"
|
---|
33 | echo
|
---|
Note:
See
TracBrowser
for help on using the repository browser.