43 lines
815 B
Bash
43 lines
815 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
seq 3.0 0.25 8.0 | while IFS= read i; do
|
||
|
echo $i
|
||
|
#node ../numbers/ -n "$i" -o "left_right_spacing_$i.svg"
|
||
|
done
|
||
|
|
||
|
|
||
|
MATCH="left_spacing_"*".svg"
|
||
|
for i in $MATCH; do
|
||
|
#echo $i
|
||
|
svg=`cat "${i}"`
|
||
|
newfile=`mktemp`
|
||
|
|
||
|
while IFS= read -r line; do
|
||
|
if [[ "${line}" == " /><g" ]]; then
|
||
|
echo " /><g transform=\"scale(0.5)\"" >> "${newfile}"
|
||
|
else
|
||
|
echo "${line}" >> "${newfile}"
|
||
|
fi
|
||
|
done <<< "${svg}"
|
||
|
|
||
|
cp "${newfile}" "${i}"
|
||
|
rm "${newfile}"
|
||
|
done
|
||
|
|
||
|
MATCH="right_spacing_"*".svg"
|
||
|
for i in $MATCH; do
|
||
|
#echo $i
|
||
|
svg=`cat "${i}"`
|
||
|
newfile=`mktemp`
|
||
|
|
||
|
while IFS= read -r line; do
|
||
|
if [[ "${line}" == " /><g" ]]; then
|
||
|
echo " /><g transform=\"scale(0.5)\"" >> "${newfile}"
|
||
|
else
|
||
|
echo "${line}" >> "${newfile}"
|
||
|
fi
|
||
|
done <<< "${svg}"
|
||
|
|
||
|
cp "${newfile}" "${i}"
|
||
|
rm "${newfile}"
|
||
|
done
|