
Ich muss je nach Bedingung anhalten tcpdump
oder tshark
eine Schleife ausführen. Derzeit verwende ich break
.
while IFS= read -r line; do if [[ $line =~ 'some protocol' ]]; then echo $line; break; fi; done < <(sudo tcpdump)
oder
while IFS= read -r line; do if [[ $line =~ 'some protocol' ]]; then echo $line; break; fi; done < <(sudo tshark)
Wie kann ich das so machen, dass ich die Nachricht nicht bekomme?Unable to write output: Broken pipe