Results 1 to 3 of 3
Hi there,
Can someone please tell me what 'sed' command I need to extract "10.2.0.4SE" from the following file please ..
GVPCOGPR:/opt/app/oracle/product/10.2.0.4SE:N
GVPGCOGPR:/opt/app/oracle/product/10.2.0.4SE:N
GVPV6CPP:/opt/app/oracle/product/10.2.0.4SE:Y
I've tried a number of ways ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-16-2012 #1Just Joined!
- Join Date
- Jul 2010
- Posts
- 5
Help with 'sed' command please
Hi there,
Can someone please tell me what 'sed' command I need to extract "10.2.0.4SE" from the following file please ..
GVPCOGPR:/opt/app/oracle/product/10.2.0.4SE:N
GVPGCOGPR:/opt/app/oracle/product/10.2.0.4SE:N
GVPV6CPP:/opt/app/oracle/product/10.2.0.4SE:Y
I've tried a number of ways but it's driving me insane !
Many thanks in advance.
- 10-16-2012 #2
This should do
Code:sed -rn 's#^GVP.*/([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.[[:alnum:]]+):.*$#\1#p' YOUR_TEXTFILE
You must always face the curtain with a bow.
- 10-16-2012 #3Just Joined!
- Join Date
- Jul 2010
- Posts
- 5
Dynamite
Cheers fella


Reply With Quote
