.txt looks like:
2013-04-10;248179;5431;5375.30€;1.49
..
..
..
I need a .csv file with a Header:
Date Visit Login
This is a pure bash solution.Store the headers in an array and set IFS to tab and then echo the header. Loop through the file with read, set IFS to ; on the way in, set
IFS to tab and run echo on the way out.
headers=(Date Visit Login Euro Rate)
((IFS=$'\t'; echo "${headers[*]}");
while IFS=';' read -r -a arr; do
(IFS=$'\t'; echo "${arr[*]}";)
done < test.fil) > test.csv