Re: Sed advice needed



On 2007-05-31T17:05:04+0100, Piers Kittel wrote:
I need to delete some words out of a large file containing
information about packets I'm analysing. I know I can use sed to do
this, but haven't really used it before, so am a bit unsure of how to
do it. Two example lines are as of below:

This is a comma separated file (CSV), so your best bet is using an
utility that can parse that format and can handle the escape rules used.

Others already gave you suitable sed commands (assuming you want to
filter all files of the line), and here is the one that does it with
cut:

cut -d, -f1-5 $input > $ouput


/Allan


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: Stop feeding the trolls!
    ... If you stupid cunts can't stop doing it, then I suggest you unsubscribe ... Rant over. ... Given this group has so many, I'm unsure whether or not this post would be ...
    (uk.comp.sys.mac)
  • Re: System/Bios Time
    ... I'm unsure about modern hardware, but older machines often suffered from ... clock-drift, and could be particularly affected by system load and/or ... I'm unsure if ntpdate sets the hardware clock; if it does, ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Sed advice needed
    ... I need to delete some words out of a large file containing information about packets I'm analysing. ... Give a man a fish, and he eats for a day. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • Re: config(8) out of sync with source
    ... >> I hadn't used that method, because I was unsure of the results, and the ... >> procedure in the Handbook is more extensive than I had time for. ... is little value in diagnostics. ... To unsubscribe, ...
    (freebsd-questions)
  • Sed advice needed
    ... I need to delete some words out of a large file containing information about packets I'm analysing. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ... Trouble? ...
    (Debian-User)