Skip to content
This repository was archived by the owner on Nov 7, 2020. It is now read-only.

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
srish committed Aug 6, 2013
1 parent 4f43129 commit cbb5ec4
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions logs/README
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,16 @@ Filtering content from the log file
===================================

cat filename.txt| grep regex | cut -d ':' -f 7
----------------------------------------------

- Combination of cat, grep and cut command is used to filter data from a log file.
Cat command opens file and outputs its content to pipe '|'. After that grep reads from pipe and tries to match with
the regular expression regex in the file. Cut command looks for a character following the delimiter (-d) in the
file and removes sections from each line of files.

- Combination of cat, grep and cut command is used to filter data from a log file.
Cat command opens file and outputs its content to pipe '|'. After that grep reads from pipe and tries to match with
the regular expression regex in the file. Cut command looks for a character following the delimiter (-d) in the
file and removes sections from each line of files.


Regular Expression :%s//}g
--------------------------

- To further filter the content, file can be opened with vim editor and regex command can be applied.

Regular expression used to retrieve chat data : :%s//}g

This expression looks for a '}' character in the entire file and wherever it finds a character matching
similar regular expression it removes it from the file.
- To further filter the content, file can be opened with vim editor and regex command can be applied.
Regular expression used to retrieve chat data : :%s//}g
This expression looks for a '}' character in the entire file and wherever it finds a character matching
similar regular expression it removes it from the file.

1 comment on commit cbb5ec4

@drewww
Copy link
Collaborator

@drewww drewww commented on cbb5ec4 Aug 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great - thanks!

Please sign in to comment.