I have a file as:
$ cat file
.
.
4h
5h
6h
7h
.
.
.
16h
17h
18h
.
.
I want to output only the lines that have '6h' and '7h' but using below awk it selects also '16h' and '17h' :(
awk '/6h/ || /7h/{print}' file
How can I make it select only '6h' and '7h' without the '16h' and '17h'. AWK is not mandatory if any other command does the job more easly.