Improve dummy log generation script
This commit is contained in:
parent
723a82ecce
commit
68e25b3a84
|
|
@ -1,9 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
LANG=en_US.UTF-8
|
||||||
|
now=$(date "+%d/%b/%Y:%H:%M:%S %z")
|
||||||
|
|
||||||
max=$(( 200000 - "$(wc -l 'much_log.log' | cut -d ' ' -f 1)"))
|
max=$(( 200000 - "$(wc -l 'mucho_log_today.log' | cut -d ' ' -f 1)"))
|
||||||
for (( i=0; i < $max; i++)); do
|
for (( i=0; i < $max; i++)); do
|
||||||
n=$(( $i % 256))
|
n=$(( $i % 256))
|
||||||
echo "10.10.100.$n - - [10/Sep/2021:23:17:55 +0200] \"GET /mentions-legales/ HTTP/2.0\" 301 178 \"https://saxodwarf.fr/tags/h%C3%A9bergement/\" \"Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0 $i\""
|
echo "10.10.100.$n - - [$now] \"GET /mentions-legales/ HTTP/2.0\" 301 178 \"https://saxodwarf.fr/tags/h%C3%A9bergement/\" \"Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0 $i\""
|
||||||
if (( $i % 1000 == 0 )); then
|
if (( $i % 1000 == 0 )); then
|
||||||
echo $i 1>&2
|
echo $i 1>&2
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue