Discussion: Sed advice needed
Afficher un message
Vieux 31/05/2007, 19h40   #10
Allan Wind
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
 
Page generated in 0,04534 seconds with 9 queries