migrate to git.charlotte.sh
This commit is contained in:
commit
fbd588721e
412 changed files with 13750 additions and 0 deletions
14
automation-sys320/week10/lecture.bash
Normal file
14
automation-sys320/week10/lecture.bash
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
file="/var/log/apache2/access.log"
|
||||
|
||||
results=$(cat $file | cut -d' ' -f1,7 | tr -d "[")
|
||||
|
||||
function pageCount(){
|
||||
counts=$(awk '{print $7}' $file | sort | uniq -c)
|
||||
}
|
||||
|
||||
pageCount
|
||||
echo "$counts"
|
||||
|
||||
#echo "$results"
|
Loading…
Add table
Add a link
Reference in a new issue