(1 / 1)
Date: January 17, 1990 13:57
From: GAWD::SHEPPERD
To: @sys$mail:ee
CC: SHEPPERD
Looking for tail? Seems like there's always a need for tail and the threshold of pain has been getting lower for those of us who want it but can't get it, so I did something about it. If you are thinking what I think you are thinking, then think again. I'm talking about the tail of a file. It's sometimes handy to look at the tail end of a file, especially a .LOG file from a batch job in progress. Unix has a nifty program called TAIL which does just that so I wrote a version for VMS. It copies the last n RECORDS of the specified input file to the specified output file (defaulting to SYS$OUTPUT) making the output file attributes EXACTLY the same as those of the input. Currently it only supports standard sequential files, not indexed or relative (hardly anybody uses relative or indexed files). All the record formats are supported except UDF (undefined). The output file inherits the record attributes of the input file but they are otherwise ignored. It can read a .LOG file while it is being created during a batch job. Login or RESTART to get the symbol, then type: $ TAIL [/number] input_file [output_file] where [] denotes optional data. The [/number] defaults to /23 so you can get 1 screen's worth. The input_file is required and there are no defaults. The output file defaults to SYS$OUTPUT (your terminal). Some examples: $ TAIL BATCH.LOG !shows the last 23 lines of the .LOG file $ TAIL /100 BATCH.LOG !shows the last 100 lines $ TAIL /1 FRED.EXE FOO.EXE !copies the last block of fred to foo ds
Jan 17, 1990