vcp file...
vcp scans the file name for a version number pattern and increments the version found by 1:
When a file contains multiple matches to recognized version numbers, the last one is the one handled as version and is incremented:
When a file name ends with a timestamp (before the suffix) as created using the sav(1) or savnow(1) commands, the timestamp is removed and the version number is incremented:
Finally, when a file name does not contain a recognized version number pattern, the new file is created with the default first version as defined in the VERSIONSTART=-V0.1 setting in the configuration file vcp.cfg(4). The VERSIONSTART setting accepts any value, but a setting should be chosen that can be computed by vcp later:
vcp can handle the following version number formats (VERSION):
VERSION ::= PREFIX, DIGIT, { DIGIT }, { ".", DIGIT, { DIGIT } } | "(", DIGIT, { DIGIT }, ")" ; PREFIX ::= " " | "_" | "-" | "v" | "V" | "#" ; DIGIT ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
In other words:
vcp can handle version numbers starting with any of the PREFIXes (SPACE,_,-,v,V,#) optionally having dots (.) to reflect major, minor, patch etc. versions or numbers without dots enclosed in round brackets.
Examples of resolved VERSION numbers based on the EBNF definition above:
V12.34.56.789 V12.3.45.67 V12.3.45.6 V12.3.45 V12.3.4.56 V12.3.4.5 V12.3.4 V12.34 V12.3 V1.2 V123 V12 V1 (123) (12) (1)
manual.docx => manual v1.docx manual.docx => manual v1.0.docx manual.docx => manual v1.0.0.docx manual_v10.docx => manual_v11.docx manual_v100.docx => manual_v101.docx manual_v1.0.docx => manual_v1.1.docx manual_v10.0.docx => manual_v10.1.docx manual_v1.00.docx => manual_v1.01.docx manual_v1.0.0.docx => manual_v1.0.1.docx manual_v1.0.00.docx => manual_v1.0.01.docx manual_V10.docx => manual_V11.docx manual_V100.docx => manual_V101.docx manual_V1.0.00.docx => manual_V1.0.01.docx manual v10.docx => manual v11.docx manual v100.docx => manual v101.docx manual v1.0.00.docx => manual v1.0.01.docx manual V10.docx => manual V11.docx manual V100.docx => manual V101.docx manual V1.0.00.docx => manual V1.0.01.docx
This is free software; see WA2LWinTools/man/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.