🎉 initiate project *astro_rewrite*
This commit is contained in:
parent
ffd4d5e86c
commit
2ba37bfbe3
8658 changed files with 2268794 additions and 2538 deletions
25
node_modules/shiki/samples/awk.sample
generated
vendored
Normal file
25
node_modules/shiki/samples/awk.sample
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#!/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
|
||||
Loading…
Add table
Add a link
Reference in a new issue