I'm having trouble ignoring the commas within a bash variable so that the csv file doesn't split up the variable into different columns. If the variable were "TACGTAT,TACG", I would want that as a single column instead of two different columns.
Here is my full script:
for filename in "$1"/*.vcf; do
bcftools query -f '%POS %REF %ALT\n' "$filename" > temp_reads.txt
echo "Sick Read!: "$(cat temp_reads.txt)""
echo ""$(basename "$filename")","$(cat temp_reads.txt)"" >> output.csv
done
And I specifically want everything in the "$(cat temp_reads.txt)" expansion to be included as a single column in the csv file in case there happened to be a comma in there.
Thanks!