Skip to content

Commit 5d1a5e4

Browse files
committed
Fix unnecessary heading double quote
1 parent ebf9aed commit 5d1a5e4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/visualization/convertQueryResultCsvToGraphVizDotFile.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,13 @@ outputFilename="${inputFilePath}/${graphName}.gv"
105105
echo "strict digraph ${graphName} {"
106106
# Extract the template content from the template file and remove the begin and end markers
107107
sed -n '/\/\/Begin-Template/,/\/\/End-Template/{//!p;}' "${templateFile}"
108-
# Remove the first (header) line of the CSV file, remove the enclosing double quotes and replace the escaped double quotes by double quotes
108+
# Remove the first (header) line of the CSV file,
109+
# print the first column prefixed with a tab,
110+
# remove heading double quote
111+
# remove the enclosing double quotes and
112+
# replace the escaped double quotes by double quotes
109113
awk -F ',' 'NR>1 {print "\t" $1}' "${inputFilename}" \
114+
| sed 's/^\t\"/\t/' \
110115
| sed 's/^\t\"\"\"/\t"/' \
111116
| sed 's/^\t\"\\\"\"/\t"/' \
112117
| sed 's/\\\"\"/"/g' \

0 commit comments

Comments
 (0)