Find the answer to your Linux question:
Results 1 to 4 of 4
My Network id is xxx.xxx.xxx.xxx I want just first three bytes with . also ( xxx.xxx.xxx. ) can u suggest me reg. expression for this. pls waiting for reply...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2006
    Posts
    7

    pls help


    My Network id is xxx.xxx.xxx.xxx

    I want just first three bytes with . also ( xxx.xxx.xxx. )

    can u suggest me reg. expression for this. pls

    waiting for reply

  2. #2
    Linux Newbie PureGrain's Avatar
    Join Date
    Nov 2006
    Location
    Mt. Washington, Kentucky
    Posts
    154
    Can you be a bit more descriptive about what you are trying too achieve?
    LINUX - "The other white meat.."
    Registered Linux User #439112

  3. #3
    Just Joined!
    Join Date
    Oct 2006
    Posts
    7
    My script input is 192.168.23.0 (or any network address)

    Output expected 192.168.23. (First three bytes only)



    (I/P) 192.168.23.0 => script => 192.168.23. (O/P)


    waiting for your eply

  4. #4
    Linux Engineer Freston's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    1,049
    Add this to your script processing the raw IP entry:
    Code:
    cut -d. -f-3
    Can't tell an OS by it's GUI

Posting Permissions

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