File: datecmd

package info (click to toggle)
tiger 2.2.4-22
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,188 kB
  • ctags: 240
  • sloc: sh: 8,388; ansic: 2,109; makefile: 141; perl: 106
file content (29 lines) | stat: -rwxr-xr-x 779 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
#
#     tiger - A UN*X security checking system
#     Copyright (C) 1993 Douglas Lee Schales, David K. Hess, David R. Safford
#
#     Please see the file `COPYING' for the complete copyright notice.
#
# NeXT/3/datecmd - 06/14/93
#
#-----------------------------------------------------------------------------
#
# Kludged date stamp for NeXT.
$DATE |
$AWK '{
	printf(substr($6,3,2));
	if ($2 == "Jan") printf "01"
	if ($2 == "Feb") printf "02"
	if ($2 == "Mar") printf "03"
	if ($2 == "Apr") printf "04"
	if ($2 == "May") printf "05"
	if ($2 == "Jun") printf "06"
	if ($2 == "Jul") printf "07"
	if ($2 == "Aug") printf "08"
	if ($2 == "Sep") printf "09"
	if ($2 == "Oct") printf "10"
	if ($2 == "Nov") printf "11"
	if ($2 == "Dec") printf "12"
	printf("%02d\n",$3);
}'