For separating the row and column in "3,4" think about $(echo $1 | ...) $(...) is command substitution, of course. If that doesn't help, see a3/getrc-hints2.