PluginConfigs/Server/logsearch.sh

17 lines
210 B
Bash
Raw Normal View History

2019-07-12 15:37:27 +00:00
#!/bin/bash
echo "$1"
#if [[ -n "$1" ]]; then
# echo "Specify what to search for."
# exit
#fi
shopt -s nullglob
fs=(*.gz)
#echo "${fs[@]}"
for f in "${fs[@]}"
do
echo File: $f
gunzip -c $f | grep "$1"
done