Thursday 15 September 2011

Love *Nix

I Still love *nix after all these years. It only took me 1 minute to convert lines like


1880,"Mary",0.072381,"girl"

to what I wanted.

$ grep \"girl\" baby-names.csv | head | cut -d, -f2 | sed 's/"//g;s/$/,F/g'
Mary,F
Anna,F
Emma,F
Elizabeth,F
Minnie,F
Margaret,F
Ida,F
Alice,F
Bertha,F
Sarah,F

No comments:

Current 5 booksmarks @ del.icio.us/pefdus