Created
April 24, 2011 22:21
-
-
Save gnubyexample/939931 to your computer and use it in GitHub Desktop.
Awk script to pull out relevant ATI & RADEON entries from a /var/log/Xorg.0.log or similar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (c) 2011 Gary Wright | |
# Usage of the works is permitted provided that this instrument is retained with | |
# the works, so that any entity that uses the works is notified of this instrument. | |
# You may additionally create derivatives under this license, | |
# or BSD "new" / Apache 2.0 / Any Free Software Foundation (fsf.org) approved license. | |
### | |
# Awk script to pull out relevant ATI & RADEON entries from a /var/log/Xorg.0.log or similar | |
### | |
/ATI/ { count["ATI"]++ } | |
/) ATI/ { count[") ATI"]++ } | |
/RADEON/ { count["RADEON"]++ } | |
/) RADEON/ { count[") RADEON"]++ } | |
/: Modeline/ { count["Modeline"]++; print "Modeline driven by ..."$1 } | |
/ Default/ { count["Default"]++; print "Default keyword found..."$1"\n" } | |
END { print "\n"count["ATI"]" lines contain ATI.\nlines really ATI count="count[") ATI"] | |
print "\n"count["RADEON"]" lines contain RADEON.\nlines really RADEON count="count[") RADEON"] } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment