Article 4T2QG CSV file output reformat

CSV file output reformat

by
jaybiano
from LinuxQuestions.org on (#4T2QG)
This is what the CSV look like

Account number (preferred / formatted),Customer reference,Posting date,Account currency,Transaction amount
750856653,233413,3/9/2019,USD,-1439.58
750856653,233431,3/9/2019,USD,-186.66
750856653,NONREF,3/9/2019,USD,14401.48

This is my desired output:

750-85665-3 0000233420 090319000000209299
750-85665-3 0000233417 090319000000285615
750-85665-3 0000233426 090319000000239225

MY CODE: (i am confused please help)
#!/bin/bash

input="/file-path/details.csv"
column -t -s: |
sed 's/ ,/,/g'
while IFS=',' read -r f1 f2 f3 f4 f5
do
echo "$f1 $f2 $f3 $f4 $f5 "
done < "$input"latest?d=yIl2AUoC8zA latest?i=CfAtbYn-Tvw:tXKFIIBr0EM:F7zBnMy latest?i=CfAtbYn-Tvw:tXKFIIBr0EM:V_sGLiP latest?d=qj6IDK7rITs latest?i=CfAtbYn-Tvw:tXKFIIBr0EM:gIN9vFwCfAtbYn-Tvw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments