I want to format data from this

```
header1|header2|header3
"ID001"|"""TEST"""|"
TEST TEST TEST"|"TEST 4"
"ID002"|"TEST"|"TESTTESTTEST"|"TEST 5"

```

into 

```
header1|header2|header3
"ID001"|"TEST"|"TEST TEST TEST"|"TEST 4"
"ID002"|"TEST"|"TESTTESTTEST"|"TEST 5"

```

So the logics are

* keep the header as original
* check other lines if not start with " then move this line to end of previous line
* replace """ to "

I want to format this with bash script.

I've created this line but still not working

```
#!/bin/bash

if [ $# -eq 0 ]
  then
    echo "No arguments supplied"
exit;
fi

FOLD=$1"*"
CHECK=$1"/bix.done"

if test -f $CHECK; then
date > /result.txt
echo "starting Covert.... "
echo "from folder : " $1    

    for file in $FOLD
    do
          if [[ $file != *History* ]]; then
        if  [[ $file == *.csv ]]; then
            FILETEMP=$file".temp"
            mv $file $FILETEMP
            awk '/^"/ {if (f) print f; f=$0; next} {f=f FS $0} END {print f}' $FILETEMP > $file
            #rm $FILETEMP           
        fi
          fi

    done
date > /home/result.txt

fi

#ls $1 -l

```