Ask Your Question
0

Is there any way to export files using tshark in csv format?

asked 2022-06-06 08:24:37 +0000

Nishant Raj gravatar image

Hi I have been trying to capture bluetooth signals using tshark and i want to export them in the form of csv files. I am actually not able to export it in csv format. I can only export it in pcapng format. Please suggest me a way for the same.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2022-06-07 06:36:14 +0000

Guy Harris gravatar image

I can only export it in pcapng format.

Note that there are two different types of writing that tshark can do. The first is "writing in a capture file format", in which the raw packet contents of in the input file are written to the output file, possibly after some processing such as selecting certain packets to be written. The -w flag specifies a file to write to, and the -F flag to specify the capture file format to write (the default is pcapng).

The second is writing out, as text, the results of dissecting the packets. The text is always written to the standard output, so you can send it to a file by redirecting the standard output or can pipe it to another program. The -T flag specifies the format.

edit flag offensive delete link more
0

answered 2022-06-06 08:36:01 +0000

grahamb gravatar image

From the tshark manpage:

-T ek|fields|json|jsonraw|pdml|ps|psml|tabs|text Set the format of the output when viewing decoded packet data. The options are one of:

...

fields The values of fields specified with the -e option, in a form specified by the -E option. For example,

tshark -T fields -E separator=, -E quote=d

would generate comma-separated values (CSV) output suitable for importing into your favorite spreadsheet program.

Note that you specify the fields required with multiple -e fieldName options.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2022-06-06 08:24:37 +0000

Seen: 1,758 times

Last updated: Jun 06 '22