if you created a dump file using
svnadmin dump /path/to/repo > Dump1.dump
You can find the latest version number with this one layer:
grep --binary-files=text "Revision-number" Dump1.dump | tail -n 1 | sed 's/Revision-number\:\ //g'
Alternatively, to avoid grepping the entire file, use tac (cat back) and stop at the first (last) match. Eliminates the need for a tail on large grep output and saves processing time.
tac Dump1.dump | grep -m1 --binary-files=text "Revision-number" | sed 's/Revision-number\:\ //g'
source share