comparison postprocess_csv.sh @ 0:81b0ca76435d draft default tip

"planemo upload for repository https://gitlab.com/eetun-tiimi/EODIE commit c4a5672398bc878dd2bc0bf4f3a26f59b3f6395c"
author climate
date Thu, 30 Dec 2021 15:24:09 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:81b0ca76435d
1 #!/usr/bin/env bash
2
3 WORKDIR=$1
4 RESDIR=$2
5
6 echo "===================================================================="
7 echo " Convert EODIE csv to tabular "
8 echo "===================================================================="
9
10 nb_csv=$(find $WORKDIR -type f -name "*.csv" | wc -l)
11 echo "Number of csv file to convert: $nb_csv"
12 if [[ $nb_csv -gt 0 ]]; then
13 echo "Start"
14 for infile in $WORKDIR/*.csv; do
15 echo "processing $infile"
16 sed -i.bak -e "s/,/\t/g" $infile
17 mv $infile $RESDIR/.
18 done
19 fi
20
21 echo "EODIE Tabular saved."