here is how i tried it
while IFS= read line do var=$(cut -d ":" -f 3 $line) if [ "$var" = "L2" ] then :here is my a