Last active
August 21, 2021 20:07
-
-
Save mmacphail/a76e3b7efee4ff54493ab62b44ed0952 to your computer and use it in GitHub Desktop.
Format avro schema to post using rest API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -o errexit | |
set -o xtrace | |
set -o nounset | |
FILE=$1 | |
function cleanup { | |
rm temp.txt | |
} | |
function format { | |
tr -d '\n\r\t ' < $FILE > temp.txt | |
sed 's/"/\\"/g' temp.txt > $FILE.formatted | |
} | |
format | |
cleanup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment