0

below are the file contents

# cat example.db
LNT_PROFILE
TMP_PROFILE
GMT_PROFILE
nyt_profile
LNX_PROFILE
LOF_PROFILE
ASA_PROFILE
ist_profile

I want to grep (print) the lines where the third character is 't', I know we can achieve this by creating a script to get the third character and pass it to the if loop and success condition will print. but i want to do it in the grep using pattern matching.

Thanks

0 Answers0