REGULAR EXPRESSION WITH GREP – DOT

grep  searches  the  named input FILEs (or standard
input if no files are named, or if a single hyphen-minus
(-) is given as file name) for lines containing a match
to the given PATTERN.  By default, grep prints the matching
lines.

commandline session

$ cat first.txt
name-jeffrin
Age-35
Sex-Male
$ grep 3. first.txt
Age-35
$ grep A. first.txt
Age-35
$ grep A first.txt
Age-35
$ grep . first.txt
name-jeffrin
Age-35
Sex-Male
$ grep x.M first.txt
Sex-Male
$ grep n. first.txt
name-jeffrin
$ grep 5. first.txt
$ grep 5. first.txt
$

Leave a comment

Your email address will not be published. Required fields are marked *