Owen_Parker
asked on
Looking for a linux command line solution
This is child-like I am sure, as all things are once you know the answer. I have never needed to do much on the command line besides the usual. I am curious if there is a way to do this simple task without writing an actual script...
I do this:
I get this:
I need this:
I thought awk would be easy, but the lack of spaces in the result shut that idea down. I have no idea how to trim this out via command line. Maybe there is a command to return only that between the single quotes or some such. Maybe a regular expression? Not my area. Hoping this can be my 'one new thing' for today...
O
I do this:
grep 'BOOTPROTO' /etc/sysconfig/network/ifcfg-eth0
I get this:
BOOTPROTO='static'
I need this:
static
I thought awk would be easy, but the lack of spaces in the result shut that idea down. I have no idea how to trim this out via command line. Maybe there is a command to return only that between the single quotes or some such. Maybe a regular expression? Not my area. Hoping this can be my 'one new thing' for today...
O
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfectly explained final answer...
ASKER