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
Another option is to use Python. I think this way it a bit more readable than using plain Bash or Perl.
function increase_version() { python - "$1" <