OlveraeUNSW
Back to problems
COMP2041

22T2 Q4 — Enumerate n..m strings

Two arguments are identical except for one embedded non-negative integer (the first digit run). Print, one per line, every string from the first integer up to the second (inclusive), keeping the common prefix/suffix.

$ ./prog log3 log6
log3
log4
log5
log6

POSIX shell only (#!/bin/dash); standard UNIX filters. From COMP2041/9044 22T2 Final.

Samples

stdin
expected
log3
log4
log5
log6
shell
14