msx-font/countchars.sh

9 lines
166 B
Bash
Raw Normal View History

2016-09-15 13:16:09 -04:00
#!/bin/bash
gm identify -format "%W %H" "$1" | while read width height
do
cols=$((width / 8))
rows=$((height / 8))
seq -f "$2" 0 $((cols*rows - 1))
done