Re: get the first word of a file
- From: "Hubble" <reiner@xxxxxxxxx>
- Date: 22 Dec 2005 04:03:46 -0800
>to obtain the FIRST DATE ONLY
>cat data | sed s/\|.*// | head -1
I woud change the order of sed and head, since sed handles here every
line which is then thrown away by head. Why not
cat data | head -1 | sed s/\|.*//
This should require less cpu
Hubble.
.
- Follow-Ups:
- Re: get the first word of a file
- From: Dan Mercer
- Re: get the first word of a file
- From: William.Deans@xxxxxxxxx
- Re: get the first word of a file
- References:
- get the first word of a file
- From: dufffman
- Re: get the first word of a file
- From: William.Deans@xxxxxxxxx
- get the first word of a file
- Prev by Date: Re: A Different Shell Philosophy
- Next by Date: Re: get the first word of a file
- Previous by thread: Re: get the first word of a file
- Next by thread: Re: get the first word of a file
- Index(es):
Relevant Pages
|