0
I wrote the following script as a practice :
#!/bin/bash
MyFile=$1
while read p; do
error=$(echo $p | awk '{print $11}')
if [ "$error" = "500" ]
then
echo $p
fi
done < $MyFile
The problem is that the script runs slowly taking hours to complete, my setup :
- Ubuntu on Windows 10 (64 with intel i7 6400 2.80GHz and 8G Ram).
Is there an issue with my setup or with the logic of the script ? Thanks,
1I don't really get what you're trying to do or how it's supposed to work but is there any reason
grep
is insufficient? What size does the input log file have? – Seth – 2018-01-30T08:46:00.3901Grep is sufficient (grep " 500 " does the trick) i'm just experimenting :) – Omar BISTAMI – 2018-01-30T14:38:07.410