Wireshark

  • Riverbed Technology
  • WinPcap
the world's foremost network protocol analyzer
  • Wireshark
    • About
    • Download
    • Blog
  • Get Help
    • Ask a Question
    • FAQs
    • Documentation
    • Mailing Lists
    • Online Tools
    • Wiki
    • Bug Tracker
  • Develop
    • Get Involved
    • Developer's Guide
    • Browse the Code
    • Latest Builds

Wireshark-users: Re: [Wireshark-users] Tshark filter problems

Date Index Thread Index Other Months All Mailing Lists
Date Prev Date Next Thread Prev Thread Next


From: Michael Bann <mbann@xxxxxxxxxxxx>
Date: Thu, 05 Apr 2007 16:47:58 -0500

Strange that it would work the other way for an older version. Oh well, works fine now. Thanks!

Sake Blok wrote:
On Thu, Apr 05, 2007 at 04:19:54PM -0500, Michael Bann wrote:
I run "tshark -f `cat /path/to/my_filter`" and I get the following error:
"tshark: Capture filters were specified both with "-f" and with additional command-line arguments"

You need to put the filter in quotes so that the OS sees it as one word:

tshark -f "`cat /path/to/my_filter`"

should do the trick. Just tried it myself:

sablo@for-gods-sake ~
$ cat filter
host 10.31.103.64 or
host 10.31.100.254

sablo@for-gods-sake ~
$ tshark -f `cat filter`
tshark: Capture filters were specified both with "-f" and with additional command-line arguments

sablo@for-gods-sake ~
$ tshark -f "`cat filter`"
Capturing on eth0
0 packets captured

sablo@for-gods-sake ~
$


Hope this helps, cheers,


Sake
_______________________________________________
Wireshark-users mailing list
Wireshark-users@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-users


--
CEMS IT Office
185 Amundson Hall
(612)-626-0712
https://www.cems.umn.edu/dept/itoffice/


  • References:
    • [Wireshark-users] Tshark filter problems
      • From: Michael Bann
    • Re: [Wireshark-users] Tshark filter problems
      • From: Sake Blok
  • Prev by Date: Re: [Wireshark-users] Tshark filter problems
  • Next by Date: [Wireshark-users] Export problem: How can i export .pdml files from .pkt files by using tshark command line?
  • Previous by thread: Re: [Wireshark-users] Tshark filter problems
  • Next by thread: [Wireshark-users] Export problem: How can i export .pdml files from .pkt files by using tshark command line?
  • Index(es):
    • Date
    • Thread

Wireshark and the "fin" logo are registered trademarks of the Wireshark Foundation