Find the answer to your Linux question:
Results 1 to 5 of 5
I want to create a tshark filter that allow me to see only the last octet from the ip addrress. more or less like this. I have a capture and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2010
    Posts
    4

    tshark programin help


    I want to create a tshark filter that allow me to see only the last octet from the ip addrress. more or less like this. I have a capture and i want a filter that only display the last 3 number from the ip.
    If i have like 192.168.10.1 i want just to see the number 1.

    Thanks

  2. #2
    tpl
    tpl is offline
    Linux User
    Join Date
    Jan 2007
    Location
    cleveland
    Posts
    477
    welcome to the forum

    if the file containing 192.168.10.1 is called "a"
    then something like this should work:

    cut -d . -f 4 <a
    the sun is new every day (heraclitus)

  3. #3
    Just Joined!
    Join Date
    Jul 2010
    Posts
    4
    thanks for the help. it works. But there is a problem. i would like to do it with tshark. and in any case i need to save the result in a .txt format.

  4. #4
    tpl
    tpl is offline
    Linux User
    Join Date
    Jan 2007
    Location
    cleveland
    Posts
    477
    cut -d . -f 4 <a >a.txt

    "tshark" unknown--what does the output look like?
    the sun is new every day (heraclitus)

  5. #5
    Just Joined!
    Join Date
    Jul 2010
    Posts
    4
    The cut process isn't the fast way to do what i want, but it works just fine.
    Once again thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •