I have a bash script that using tshark command. when I use tshark -b filesize option, all the script lines are running well. But, when I use tshark -b duration option instead, the capturing is working well but the next script lines are stopped.
I'll give my script. please help me..
This is my bash script.
printf "start packet capturing\n\n"
while echo ~/wireshark/build/run/tshark -nni ens33 -T ek -w /var/packets/test.pcap -b duration:30
do shopt -s nullglob
for filename in /var/packets/*.pcap; do
foldername=$(echo "$filename" | awk '{print (substr($0, 25, 8));}');
mkdir -p /var/packets/"$foldername"
echo `~/wireshark/build/run/tshark -r "$filename" -T ek > "$filename".json`
mv "$filename" /var/packets/"$foldername"
mv "$filename".json /var/Json
echo "$filename $foldername" ;
done
done
thanks.