Revision history [back]
starting tshark with given parameter from bash script
Hello, I am launching tshark with the following cmd line on a RPi with Debian Jessie without any problem:
tshark -i "eth0" -f "port 8000" -w /tmp/x.pcap
Now I want to pack this in a bash script called shark0 so that inexperienced users can take captures and send me the file.
The script looks like that:
#!/bin/sh
shark="tshark -i "'"eth0"'" -f "'"port 8000"'" -w /tmp/x.pcap"
echo $shark
$shark &
Unluckily this script only opens the tshark options manual, thus I suppose something must be wrong with the parameters. When I copy the output of the echo $shark line to the command prompt, tshark executes normally. I have installed tshark the default way, answering the window that pops up with "YES" and adding user pi to the group:
sudo usermod -a -G wireshark pi
And I am not running the script as root!
Thx for advice
starting tshark with given parameter from bash script
Hello,
Hello,
I am launching tshark with the following cmd line on a RPi with Debian Jessie without any problem:
Now I want to pack this in a bash script called shark0 so that inexperienced users can take captures and send me the file.
#!/bin/sh
!/bin/sh
shark="tshark -i "'"eth0"'" -f "'"port 8000"'" -w /tmp/x.pcap" echoUnluckily this script only opens the tshark options manual, thus I suppose something must be wrong with the parameters.
When I copy the output of the echo $shark line to the command prompt, tshark executes normally.
I have installed tshark the default way, answering the window windoe that pops up with "YES" and adding user pi to the group:
group:
sudo usermod -a -G wireshark pi
And I am not running the script as root!
Thx for advice