Sleds/posting/cl-to-json.sh

16 lines
340 B
Bash

#!/bin/sh
echo '{"target": "CoreLogic", "map": ['
while read fieldNum
do
read ignore
read targetName
read length
read start
read end
echo '{"nbr":' ${fieldNum} ',"frName":"*","targetName":"'${targetName}'","targetLength":' ${length} ',"targetStart":' ${start} ',"targetEnd":' ${end} ',"mappingClass":"RawMapper"},'
done
echo ']}';