I am a noob to scripting in bash.
Here are the two errors I keep getting: line 16: unexpected EOF while looking for matching `"' line 18: syntax error: unexpected end of file
For line 16 the " is matching I'm not even sure what is wrong with 18 at all Any help would be much appreciated.
#!/bin/bash
# Script for Capture
# sudo tshark -i2 -f "tcp" -P -S -l -w mbcap.pcap
_now=$(date +"%m_%d_%Y")
_file="~/captures/$_now.pcap"
echo "Starting capture to $_file..."
echo "Creating Output Directory as: $_file
touch $_file
chmod 666 $_file
echo "Which Interface Would you like to capture on:"
sudo tshark -D
read selection
sudo tshark -i$selection -f "tcp" -P -S -l -w $_file
You are missing a closing " on the line where you're outputting:
echo "Creating Output Directory as: $_file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With