The following simple version control script is meant to find the last version number of a given file, increment it, run a given command with the newly created file (e.g., ed
Tired of bash? Why not try Perl?
$ cat versions 1.2.3.44 1.2.3.9 1.2.3 9 $ cat versions | perl -ne 'chomp; print join(".", splice(@{[split/\./,$_]}, 0, -1), map {++$_} pop @{[split/\./,$_]}), "\n";' 1.2.3.45 1.2.3.10 1.2.4 10
Not quite in compliance with the requirement, of course.