Wednesday, June 1, 2016

grep extract

Suppose you want 150 lines after the line containing "2016-05-31 11:06:39.265" from file postgresql-31.csv:
grep -A150 '2016-05-31 11:06:39.265' postgresql-31.csv > /tmp/postgresql-31.csv.extract