#jq コマンドで出力されるダブルクォートを #perl で削除する例


jq

there is double quotation

$ echo '["A\\nB\\nC"]' | jq  '.[]'
"A\nB\nC"

jq --raw-output

there is not double quotation but new lines

$ echo '["A\\nB\\nC"]' | jq --raw-output '.[]'
A
B
C

perl replace

i tried this

$ echo '["A\\nB\\nC"]' | jq '.[]' | perl -pe 's/^"|"$//g'
A\nB\nC

Original by Github issue