Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Help using grep

Name: Anonymous 2011-10-28 18:53

So I've got a text document I want to pull lines from in order of date. I've got every line starting with //10-20-11\\ (or whatever the date happens to be). Can I do this with grep, and if so how?

Name: Anonymous 2011-10-28 19:25

What the fuck shitheads..

Name: Anonymous 2011-10-28 19:30

man grep

Name: Anonymous 2011-10-28 21:13

Anybody? Maybe the image board guys will know something

Name: Anonymous 2011-10-28 23:58

The command would be:
more <filename> | grep <specific text>

Name: Anonymous 2011-11-01 12:45

grep '//10-20-11\\\\' <filename> | sort -nt '-' -k 3 -k 2 -k 1


grep filters, sort sorts. backslashes have to be escaped by prepending backslashes. see man sort for what the options -n -t and -k do.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List