setdate.pl

Description

Setdate.pl is a HFPM module that sets given field(s) or environmental variable(s) to the current date and time.

Usage

setdate.pl {$field | envvar | %envvar} in the pipeline.

Usage Explanation

The fields and environmental variables are set to the output of the UNIX 'date' command. If none are specified, then the environmental variable "count" is used as the destination.

A '$' prefix means a field destination and a '%' prefix indicates the destination is an environmental variable, which is the default.

Examples

setdate.pl $afield %var c
sets the field "afield" and the environmental variables "var" and "c" to the current date.
setdate.pl
sets the environmental variable "count" to the output of "date".

Other Notes

The current version number is 1.0.

This module should work on any UNIX implementation with the "date" program.

This module can be used more than once in the pipeline, but no functionality is gained by doing so.


[HFPM Home] [Please comment]
Copyright © by James Hoagland
www.hoagland.org | webmaster@hoagland.org
3 January 1996