Wednesday, October 3, 2012

Linux script/command to display lines ends with .(dot) and ;(semicolon)

This is a small post on how to view lines which contain . or ; at the end  of each line in a file. This command can be even consider for searching lines for different end char too.

grep '[.;]$' filename
or
grep -E '(\.|;)$' filename

0 comments:

Post a Comment