Hi, Brian:

 Thanks.  Your suggestion is the similar to Jim's with
the arguments reversed.

 You and Jim have fed me. Thanks.
Please teach me to fish.  ;-)

 I don't understand the '-f1' and '-f2' arguments.

IMHO, 'man cut' and 'info cut' are equally obfuscating:

-f, --fields=LIST
 output only these fields

duh, what!

Please briefly explain.

Regards, Chuck


Brian Jackson wrote:
> 
> Oops. I meant:
> 
> grep $your_options | cut -f2 -d\( | cut -f1 -d\)
> 
> Brian Jackson writes:
> 
> > Maybe something like:
> >
> > grep $your_options | cut -f2 -d( | cut -f1 -d)
> >
> > That might work. Hard to say for sure, but it looks right. Should give you
> > just the IP address. HTH
> >
> > --Brian Jackson
> >
> > Chuck Gelm writes:
> >
> >> Howdy, Y'all:
> >>
> >>  Using 'grep' I've parsed some stdout to lines ending in
> >> ...(123.45.67.89):
> >>  How can I either:
> >>   extract the last 17 characters
> >>   all characters after the first "("
> >>   all characters from "(" to ")"
> >>  ?
> >>
> >>  I tried
> >> cut -c ".0123456789" filename.txt
> >>  but it returns cut: invalid byte or field list.
> >>  :-|
> >>
> >> Regards, Chuck
> >> -
> >> To unsubscribe from this list: send the line "unsubscribe linux-newbie"
> >> in
> >> the body of a message to [EMAIL PROTECTED]
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >> Please read the FAQ at http://www.linux-learn.org/faqs
> >
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> > the body of a message to [EMAIL PROTECTED]
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.linux-learn.org/faqs
>
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to