Results 1 to 3 of 3
Hello all,
im developing a frontend to xrandr in gambas and require some help. my program is currently getting all the information from the xrandr tool.
output :
Screen 0: ...
- 11-14-2008 #1Just Joined!
- Join Date
- May 2007
- Location
- England
- Posts
- 9
grep xrandr question
Hello all,
im developing a frontend to xrandr in gambas and require some help. my program is currently getting all the information from the xrandr tool.
output :
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 1024 x 1024
VGA disconnected (normal left inverted right x axis y axis)
LVDS connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1024x768 60.0*+ 85.0 75.0 70.1 60.0
832x624 74.6
800x600 85.1 72.2 75.0 60.3 56.2
640x480 85.0 72.8 75.0 59.9
720x400 85.0
640x400 85.1
640x350 85.1
my question is how do i grep just the LVDS line then the following resolutions??
thanks in advance.
- 11-14-2008 #2
Sounds like a job for awk, not grep.
Men occasionally stumble over the truth,
but most of them pick themselves up
and hurry off as if nothing had happened.
Winston Churchill
... then the Unix-Gods created "man" ...
- 11-15-2008 #3Linux Engineer
- Join Date
- Apr 2006
- Location
- Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
- Posts
- 1,117
Hi.
Recent versions of grep allow an option to specify after context, so that a number of lines can be copied after a match. See man grep for details ... cheers, drlWelcome - get the most out of the forum by reading forum basics and guidelines: click here.
90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
We look forward to helping you with the challenge of the other 10%.
( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )


Reply With Quote