Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rice!uw-beaver!fluke!gtisqr!roger From: roger@gtisqr.uucp (Roger Droz) Newsgroups: comp.text Subject: Printing file modification date in *roff. Message-ID: <1990May30.163357.6070@gtisqr.uucp> Date: 30 May 90 16:33:57 GMT Reply-To: roger@gtisqr.UUCP (Roger Droz) Distribution: na Organization: Global Tech International Inc. Lines: 37 I am always forgetting to change the revision date when I modify a document, so I wonder if there is a way to automatically date a file with its modification date. I don't think that nroff has access to the name of the file it is processing, so I don't think that nroff has any information it can use to ask the system for a modification date. Since most documents I want to date are maintained using rcs(1), it should be possible to reformat the ouput of the rcs $Date$ macro to something that looks nicer than: $Date: 90/05/29 12:07:53 $ I am thinking in terms of a few commands, or perhaps a macro, that can be placed at the beginning of the file to translate the above string into an nroff string that contains the date as month/day/year. .\" include my favorite macros .so format.n .\" RCS expands $Date$ as above; .\" macro translates it to mm/dd/yy in string dT. .mymacro $Date$ Last revised on \*(dT Perhaps there is a wizzard on the net who has already done this. I'm enough of a novice at writing nroff macros that its quicker to ask the net than to RTM and come up the learning curve. ____________ Roger Droz UUCP: uw-beaver!gtisqr!roger () () Maverick MICRoSystems / Global Technology International (_______) Mukilteo, WA ( ) | | Disclaimer: "We're all mavericks here: | | Each of us has our own opinions, (___) and the company has yet different ones!"