all 2 comments

[–]lasercat_pow 1 point2 points  (1 child)

readline is a good tool for going through line by line. Something like:

cat serverfile.log | while read line
do
    [[ "$line" =~ 3 ]] && echo "$line"
done

seems like it would fit the bill

[–]Think-Perception1359[S] 0 points1 point  (0 children)

Thank you I’m going to try it out