I have a rare problem.
When I execute a file by console, it works well, but when I execute it (the same file) by crontab I receive an error in the following part of the code
join -j 1 -t ',' <(sort $dir/Xem3.csv) <(sort $dir/coordenades.csv)|awk -F "," '{print $15","$16","$17"," $3"," $4","$18"," $5"," $6","$7","$8"," $9","$10","$11","$12","$13}' > $dir/Xem4.csv
the error in the log of the crontab is
/home/enric/proves/web.sh: line 95: syntax error near unexpected token `('
/home/enric/proves/web.sh: line 95: `join -j 1 -t ',' <(sort $dir/Xem3.csv) <(sort $dir/coordenades.csv)|awk -F "," '{print $15","$16","$17"," $3"," $4","$18"," $5"," $6","$7","$8"," $9","$10","$11","$12","$13}' > $dir/Xem4.csv'
any idea?
My script is
#/bin/bash
dir=/home/enric/proves
join -j 1 -t ',' <(sort $dir/Xem3.csv) <(sort $dir/coordenades.csv)|awk -F "," '{print $15","$16","$17"," $3"," $4","$18"," $5"," $6","$7","$8"," $9","$10","$11","$12","$13}' > $dir/Xem4.csv
tr -d '\r' < $dir/Xem4.csv > $dir/out.csv