deploy: ebd4cc0010
This commit is contained in:
25
node_modules/shiki/samples/awk.sample
generated
vendored
25
node_modules/shiki/samples/awk.sample
generated
vendored
@@ -1,25 +0,0 @@
|
||||
#!/bin/awk -f
|
||||
BEGIN {
|
||||
# How many lines
|
||||
lines=0;
|
||||
total=0;
|
||||
}
|
||||
{
|
||||
# this code is executed once for each line
|
||||
# increase the number of files
|
||||
lines++;
|
||||
# increase the total size, which is field #1
|
||||
total+=$1;
|
||||
}
|
||||
END {
|
||||
# end, now output the total
|
||||
print lines " lines read";
|
||||
print "total is ", total;
|
||||
if (lines > 0 ) {
|
||||
print "average is ", total/lines;
|
||||
} else {
|
||||
print "average is 0";
|
||||
}
|
||||
}
|
||||
|
||||
#From https://www.grymoire.com/Unix/Awk.html
|
||||
Reference in New Issue
Block a user