UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: systemChapter 11
The awk Programming Language
Next: Reference: tolower
 

systime

systime()

Return a time-of-day value in seconds since midnight, January 1, 1970, UTC. {G}

Example

Log the start and end times of a data-processing program:

BEGIN {
	now = systime()
	mesg = strftime("Started at %m/%d/%Y %H:%M:%S", now)
	print mesg
}
process data ...
END {
	now = systime()
	mesg = strftime("Ended at %m/%d/%Y %H:%M:%S", now)
	print mesg
}


Previous: Reference: systemUNIX in a Nutshell: System V EditionNext: Reference: tolower
Reference: systemBook IndexReference: tolower

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System