title: Bash script to add double quotes in .CSV comma delimited file
body: <p>I need to add double quotes to the csv file. My sample data is like this..</p>
  
  <pre><code>378478,COMPLETED,Tracfone,,,"2020/03/29 09:39:22",,2787,,356074101197544,89148000005748235454,75176540
  378328,COMPLETED,"Total Wireless","Unlimited Talk, Text, &amp; Data (First 25GB High Speed, then unlimited 2GB)",50,"2020/03/29 06:10:01",200890899011202395,0899,0279395,356058102052972,89148000005117597971,67756296
  </code></pre>
  
  <p>I have tried some code available online with <code>awk</code> and <code>sed</code>, it is resulting as below , Error - **First digit in the number is being trimmed like for ex. in '378478' it is only displaying '78478'.</p>
  
  <p>Also it is adding double quotes to already existing double quotes too!** nothing seems to be perfectly working. Please guide me!</p>
  
  <pre><code>"78478","COMPLETED","Tracfone","","",""2020/03/29 09:39:22"","","2787","","356074101197544","89148000005748235454","75176540"
  "78328","COMPLETED",""Total Wireless"",""Unlimited Talk"," Text"," &amp; Data (First 25GB High Speed"," then unlimited 2GB)"","50",""2020/03/29 06:10:01"","200890899011202395","0899","0279395","356058102052972","89148000005117597971","67756296"
  "78329","COMPLETED",""Cricket Wireless"",""Unlimited Talk"," Text"," &amp; 4G LTE Data w/ 15GB Hotspot"","60",""2020/03/29""
  </code></pre>
  
  <p>This is the code I am using:</p>
  
  <pre><code>awk -F"'?,'?" -v OFS='","' '{$1=$1; gsub(/^.|$/,"\"")} 1' file # or
  sed -E 's/([^,]*) , (.*)/"\1" , "\2"/' file
  </code></pre>
  
  <p><strong>My total code is the below one. my Intention was to first convert all .xlsx to .csv and then add double quotes to same csv and save it in the same file.i know the $file.csv part is wrong, hence i need some help</strong></p>
  
  <pre><code>find "$Src_Dir" -type f -iname "*.xlsx" -print&gt;path/temp
  
  cat path/temp | while IFS="" read -r -d $'\0' file; 
  do
      echo $file
      ssconvert "${file}" --export-type=Gnumeric_stf:stf_csv
      awk -F"'?,'?" -v OFS='","' '{$1=$1; gsub(/^.|$/,"\"")} 1' $file &gt; $file.csv
  done
  </code></pre>