skip to main
|
skip to sidebar
X8B
Tuesday, August 4, 2009
Using Grep to return only the match, getting unique/distinct results, and sorting
Display only the matches (in this case, occurrences of 6 numbers in a row)
grep -o "[0-9]\{6\}" test.txt
Removing repeated results, and sorting
grep -o "[0-9]\{6\}" test.txt | uniq | sort
Woo.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Followers
Blog Archive
►
2010
(1)
►
August
(1)
▼
2009
(3)
▼
August
(1)
Using Grep to return only the match, getting uniqu...
►
February
(1)
►
January
(1)
About Me
Mead
View my complete profile
No comments:
Post a Comment