Skip to content

Commit

Permalink
continue regex exercice
Browse files Browse the repository at this point in the history
  • Loading branch information
romaincarlier4 committed Oct 26, 2023
1 parent ad8ba09 commit 54925e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Regex/run
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ regex4=$(cat student_regex4)
output1=$(grep -oP $regex1 apache.log)
good_output1=$(grep -oP '(\d{1,3}\.){3}\d{1,3}' apache.log)

if [ $output1==$good_output1 ]; then
if [ $output1 == $good_output1 ]; then
feedback-result --id regex1 success
feedback-msg -em "Bravo"
else
Expand All @@ -26,7 +26,7 @@ fi
output2=$(grep -oP $regex2 apache.log)
good_output2=$(grep -oP '\[.*?\]' apache.log)

if [ $output2==$good_output2 ]; then
if [ $output2 == $good_output2 ]; then
feedback-result --id regex2 success
feedback-msg -em "Bravo"
else
Expand All @@ -37,7 +37,7 @@ fi
output3=$(grep -oP $regex3 apache.log)
good_output3=$(grep -oP '"GET\s.*?"' apache.log)

if [ $output3==$good_output3 ]; then
if [ $output3 == $good_output3 ]; then
feedback-result --id regex3 success
feedback-msg -em "Bravo"
else
Expand All @@ -48,7 +48,7 @@ fi
output4=$(grep -oP $regex4 apache.log)
good_output4=$(grep -oP '^.*200.*$' apache.log)

if [ $output4==$good_output4 ]; then
if [ $output4 == $good_output4 ]; then
feedback-result --id regex4 success
feedback-msg -em "Bravo"
else
Expand Down

0 comments on commit 54925e0

Please sign in to comment.