aboutsummaryrefslogtreecommitdiff
path: root/txt2json.sh
blob: 75f28025d2756f5a86e8007d5a5001eedd8d5375 (plain)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env sh
cp cv_json_format.txt cv_json_format.json
# remove comments
sed -i 's://.*$::g' cv_json_format.json
# remove trailing spaces
sed -i 's/\s*$//g' cv_json_format.json
# remove lines with whitespace
sed -i '/^$/d' cv_json_format.json
# verify json
cat cv_json_format.json | json_verify