+# This script is used parse apache access log filtering specific ip and http outcome
+httpStatusDelimiter=" ";
+read -p "Which log file do you want to parse? " file2parse
+ if [ ! -f "$file2parse" ]; then
+ echo "File not found!";
+ echo "Parsing file: $file2parse";
+ read -p "Which HTTP status search? " httpStatus;
+ while ! [[ "$httpStatus" -gt 1 ]]; do
+ read -p "Sorry integers only, please retype HTTP status:" httpStatus
+ echo "Please insert ip list (only one ip in a single line)";
+ while read -r line && [[ -n "$line" ]]; do
+ ips="$ips""$ipsSeparator""$line";
+ httpStatus="${httpStatusDelimiter}$httpStatus${httpStatusDelimiter}";
+ grep "$ips" "$file2parse" |grep -F "$httpStatus";