Re: get the first word of a file



>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.

.



Relevant Pages

  • Re: Hard Core Rider
    ... thrown off, like at 60mph, would, really, ''bump'' ones head, and cause ... My main point above,is I think a rider falling off, might just have a ... better chance, than being thrown off, especially at high speeds. ... Above you state that a rider that comes off a motorcycle at 100 mph, ...
    (rec.motorcycles)
  • Re: Hard Core Rider
    ... thrown off, like at 60mph, would, really, ''bump'' ones head, and cause ... My main point above,is I think a rider falling off, might just have a ... better chance, than being thrown off, especially at high speeds. ... Above you state that a rider that comes off a motorcycle at 100 mph, ...
    (rec.motorcycles)
  • Re: Burglar sues
    ... weight of the Police and Judicial system being thrown at your head good ... style - all paid for out of the bottomless public purse, of course, ...
    (rec.martial-arts)
  • Re: Hard Core Rider
    ... thrown off, like at 60mph, would, really, ''bump'' ones head, and cause ... My main point above,is I think a rider falling off, might just have a ... better chance, than being thrown off, especially at high speeds. ... Above you state that a rider that comes off a motorcycle at 100 mph, ...
    (rec.motorcycles)
  • Re: get the first word of a file
    ... :>: line which is then thrown away by head. ... :> Instead of a useless use of cat and a useless use of sed. ... technique any shell programmer should know. ...
    (comp.unix.shell)