Mercurial > ec-dotfiles
annotate bin/statfun @ 710:81711bd8cac9
Update 0paste url
| author | nanaya <me@nanaya.net> | 
|---|---|
| date | Tue, 17 Oct 2023 15:39:50 +0900 | 
| parents | 5bafb912837e | 
| children | 
| rev | line source | 
|---|---|
| 124 
5bafb912837e
Massive addition of old scripts collection.
 Edho Prima Arief <edho@myconan.net> parents: diff
changeset | 1 #!/bin/sh | 
| 
5bafb912837e
Massive addition of old scripts collection.
 Edho Prima Arief <edho@myconan.net> parents: diff
changeset | 2 > /tmp/mainlogfun | 
| 
5bafb912837e
Massive addition of old scripts collection.
 Edho Prima Arief <edho@myconan.net> parents: diff
changeset | 3 while read line; do | 
| 
5bafb912837e
Massive addition of old scripts collection.
 Edho Prima Arief <edho@myconan.net> parents: diff
changeset | 4 filename=$(printf "%s" "${line}" | grep OK\ DOWNLOAD | grep -v "^$" | sed -e 's/.*OK DOWNLOAD: Client "[^"]*", "\(.*\)"..*/\1/') | 
| 
5bafb912837e
Massive addition of old scripts collection.
 Edho Prima Arief <edho@myconan.net> parents: diff
changeset | 5 basename -- "${filename}" >> /tmp/mainlogfun | 
| 
5bafb912837e
Massive addition of old scripts collection.
 Edho Prima Arief <edho@myconan.net> parents: diff
changeset | 6 done < /srv/log/vsftpd/main.log | 
| 
5bafb912837e
Massive addition of old scripts collection.
 Edho Prima Arief <edho@myconan.net> parents: diff
changeset | 7 grep -v "^$" /tmp/mainlogfun > /root/mainlogfun | 
| 
5bafb912837e
Massive addition of old scripts collection.
 Edho Prima Arief <edho@myconan.net> parents: diff
changeset | 8 | 
