Hello, On Sat, 22 Nov 2008, David C. Rankin wrote:
I am trying to pull the current driver out of the xorg.conf and I have come up with a non-elegant way to do it but I'm concerned that I'm limiting it by only grabbing 2 additional lines on either side of "Identifier" to search for the Driver. Here is what I have:
CURRENTDRIVER=$(grep -A2 -B2 Identifier[[:blank:]]*\"Device[[] /etc/X11/xorg.conf | grep Driver | awk --field-separator '"' '{ print $2 }')
Is there a cleaner way to do this?
sed -n '/Section.*"Device"/,/EndSection/ { /Driver/s/.*"\([^"]*\)".*/\1/p; }' /etc/X11/xorg.conf -dnh -- Hey, what do you expect from a culture that *drives* on *parkways* and *parks* on *driveways*? -- Gallagher -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org