Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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
    Linux User
    Join Date
    Jan 2007
    Location
    cleveland
    Posts
    480
    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
    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. $spacer_open
    $spacer_close
  5. #4
    Linux User
    Join Date
    Jan 2007
    Location
    cleveland
    Posts
    480
    cut -d . -f 4 <a >a.txt

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

  6. #5
    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
  •