Reputation: 2030
I have a property file with below contents.
mongodb.databasename=dbname
#mongodb.databasename=dbname
from this i need to take out the line which has only "mongodb.databasename=dbname". I tried with
cat app.properties | grep mongodb.databasename=dbname
but it retrieves both the line as a result. i tried with many options line -w, -F, -h but i couldn't get what i need. Could anyone help me how shouldi get only the exact matched line. I tried from this also "How to make grep only match if the entire line matches?" but i couldn't get what i need.
Upvotes: 0
Views: 39