cs-3424: correct all count for assign 3
This commit is contained in:
parent
13a67dc9a3
commit
0b8f58631c
@ -8,7 +8,6 @@ BEGIN {
|
|||||||
newestFileDate=0
|
newestFileDate=0
|
||||||
newestFileTime=0
|
newestFileTime=0
|
||||||
totalUsers=0
|
totalUsers=0
|
||||||
totalRegFiles=0
|
|
||||||
totalHidFiles=0
|
totalHidFiles=0
|
||||||
totalOthers=0
|
totalOthers=0
|
||||||
totalBytes=0
|
totalBytes=0
|
||||||
@ -53,7 +52,6 @@ BEGIN {
|
|||||||
oldestFileDate=date
|
oldestFileDate=date
|
||||||
oldestFileTime=time
|
oldestFileTime=time
|
||||||
}
|
}
|
||||||
totalRegFiles++
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
data[user]["others"]++
|
data[user]["others"]++
|
||||||
@ -64,6 +62,7 @@ BEGIN {
|
|||||||
totalBytes+=$5
|
totalBytes+=$5
|
||||||
}
|
}
|
||||||
END {
|
END {
|
||||||
|
totalAll=0
|
||||||
for (user in data) {
|
for (user in data) {
|
||||||
if (isarray(data[user])) {
|
if (isarray(data[user])) {
|
||||||
all=data[user]["all"]
|
all=data[user]["all"]
|
||||||
@ -77,6 +76,8 @@ END {
|
|||||||
hidden=(hidden ? hidden : 0)
|
hidden=(hidden ? hidden : 0)
|
||||||
bytes=(bytes ? bytes : 0)
|
bytes=(bytes ? bytes : 0)
|
||||||
|
|
||||||
|
totalAll+=all
|
||||||
|
|
||||||
printf "Username: %s\n", user
|
printf "Username: %s\n", user
|
||||||
if (all > 0 ) {
|
if (all > 0 ) {
|
||||||
printf " Files:\n"
|
printf " Files:\n"
|
||||||
@ -103,8 +104,8 @@ END {
|
|||||||
printf "\n"
|
printf "\n"
|
||||||
|
|
||||||
printf "Total users: %d\n", totalUsers
|
printf "Total users: %d\n", totalUsers
|
||||||
printf "Total Files:\n"
|
printf "Total files:\n"
|
||||||
printf " (All / Hidden): ( %d / %d )\n", totalRegFiles, totalHidFiles
|
printf " (All / Hidden): ( %d / %d )\n", totalAll, totalHidFiles
|
||||||
printf "Total directories: %d\n", totalDirs
|
printf "Total directories: %d\n", totalDirs
|
||||||
printf "Total others: %d\n", totalOthers
|
printf "Total others: %d\n", totalOthers
|
||||||
printf "Storage (B): %d bytes\n", totalBytes
|
printf "Storage (B): %d bytes\n", totalBytes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user