Menü +

find ./ -type f -name '*source-string*'

Convert Apache Log to CSV


#_______________________________________________________________________	
#           _____        _____ _    _ ______   _      ____   _____ 
#     /\   |  __ \ /\   / ____| |  | |  ____| | |    / __ \ / ____|
#    /  \  | |__) /  \ | |    | |__| | |__    | |   | |  | | |  __ 
#   / /\ \ |  ___/ /\ \| |    |  __  |  __|   | |   | |  | | | |_ |
#  / ____ \| |  / ____ \ |____| |  | | |____  | |___| |__| | |__| |
# /_/    \_\_| /_/    \_\_____|_|  |_|______| |______\____/ \_____|
#_______________________________________________________________________	
	

for i in $(sudo find /Apache/Apache/logs -mtime -7 | grep error);
     do while read line;
          do echo "$(echo $line | sed 's/\[//g' | sed 's/\\n//g' | sed 's/\]/;/g');$i" >> /home/user/log/$(date +%d%m%Y)_$(hostname)_apache_error_log.csv;done < $i;
     done