migrate to git.charlotte.sh
This commit is contained in:
commit
fbd588721e
412 changed files with 13750 additions and 0 deletions
14
automation-sys320/week11/getLogs.bash
Normal file
14
automation-sys320/week11/getLogs.bash
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
logDir="/var/log/apache2/"
|
||||
allLogs=$(ls "${logDir}" | grep "access.log" | grep -v "other_vhosts")
|
||||
echo "${allLogs}"
|
||||
|
||||
:> access.txt
|
||||
|
||||
for i in ${allLogs}
|
||||
do
|
||||
cat "${logDir}${i}" >> access.txt
|
||||
done
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue