Re: string splitting



xyz wrote:

I have a string
16:23:18.659343 131.188.37.230.22 131.188.37.59.1398 tcp 168

for example lets say for the above string
16:23:18.659343 -- time
131.188.37.230 -- srcaddress
22 --srcport
131.188.37.59 --destaddress
1398 --destport
tcp --protocol
168 --size
i need to split this string such that i need to get all these
parameters....the filed widths are not fixed...some time i have 4/3
digits srcport

thank you for any help

See my response to one of your posts on comp.lang.c.

.



Relevant Pages

  • Re: Read strings from one file and search for them in a directory containing htm files
    ... > XyZ technology helps make home networking simple. ... Now we're back to about my original suggestion, if there's no newlines ... while IFS= read -r string ...
    (comp.unix.shell)
  • Re: Help with shell script
    ... for the string 'abc', and puts the matching lineinto the variable xyz. ... in xyz to awk. ... ..which will print the second column from the /etc/passwd delimited by ':'s. ...
    (comp.unix.shell)
  • Re: Filtering a form using a combo and 2 dates
    ... open my Form that is based on "XYZ table/query" but only return ... the records that match this string. ... not have a field called "dateStart" ... "RentalAgreement" is between some values. ...
    (microsoft.public.access.forms)
  • Re: String To List
    ... list with elements 'xyz' and 'abc'. ... could the string module not use a ... string enclosed by delim (or which begin with delim and end with ... (odd number of delimiters, or opening/closing delims ...
    (comp.lang.python)
  • Re: How to extract a string starting with abc & ending with xyz ?
    ... But if the length of the string varies between 10 to 50* what ... You are only comparing the string with "abc xyz". ... The automatic assumption that all programs should write error messages ...
    (comp.lang.c)