I am trying to extract the value of a parameter from the text file.
Below is my text file with uri_param as parameter.
application.txt
---------------
uri_param=frontier://tenant=stripe;env=qa;[email protected]:80
command:
--------
egrep ^uri_param application.txt | sed -e 's/.*=//'
I am expecting the strign after first =
as output i.e. frontier://tenant=stripe;env=qa;[email protected]:80
, but the output I am getting is [email protected]:80
.
How can I fix this? What I found till now is .* in sed is greedy and it will match the longest string after =
.
sed -r 's/^[_0-9a-zA-Z]+=//g' File_Name
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments