Listing 3: template
#######################################################
# template - template for creating awk scripts to read
# the output from stat in a standard format.
#_begin template for stat args: -oidlugpsanw
# mode inum device [idnum] links uid gid fsize day
# month dayofmonth time year [access] fname
mode=$1
inum=$2
device=$3
# the [constructed] idnum must be used when scanning
# multiple file systems in order to uniquely
# identify the file.
idnum=sprintf("%s %s", inum, device)
links=$4
uid=$5
gid=$6
fsize=$7
day=$8
month=$9
dayofmonth=$10
time=$11
year=$12
# access=sprintf("%s %s %s %s %s",
# day, month, dayofmonth, time, year)
fname=$13
#_end template
|