-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sun, 07 Jul 2013 21:09:22 -0400 Felix Miata <mrmazda@earthlink.net> wrote:
Anyone know a good source of examples for dweebs who can't remember from one scripting writing session to the next anything new learned to get a task done, and requires examples rather than reading man pages to understand anything unfamiliar?
I have a script containing among other things the following:
grep 'using VT' /var/log/Xorg.0.log head -n7 /var/log/Xorg.0.log grep Output /var/log/Xorg.0.log | egrep -v 'disconnected|no monitor'
This works fine as long as it's run on a default X session, but not otherwise. I need to substitute for each "0" in the above strings the value of the actual display in use, which happens to be the last of the two visible characters of $DISPLAY. I tried to figure out if I could somehow apply the cut command to $DISPLAY, but got nowhere via its man page. Is what I want to do a for loop task? Can anyone here help with this seemingly simple goal?
Hi Felix, "Learning the Bash shell" from O'Reilly (www.oreilly.com). Some of the examples are a bit weak but basics thoroughly covered. Tom KG7CFC -- "We could certainly slow the aging process down if it had to work its way through Congress". - Will Rogers ^^ --... ...-- / -.- --. --... -.-. ..-. -.-. ^^^^ Tom Taylor - retired penguin - KG7CFC AMD Phenom II x4 955 -- 4GB RAM -- 2x1.5TB sata2 openSUSE 12.3-x86_64 KDE 4.10.00, FF 19.0, claws-mail 3.9.1 registered linux user 263467 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQEcBAEBAgAGBQJRWnjBAAoJEHjxEe80vkwITlwIAPb2aBryi1pBNtlTTL87E1cB +71yW5BbhS26IBkqy5o+u/KUdJGEQZ3kFcNn+7IFcTlhUMfmbz17GiVP60g2e9gW D91lvWyTH7CA+1pKoHAMtjK+U6KC9uclnWRObYPHHJjDyLdJBoRDD6r8SYn4fdiD dFRoV9tYhTRJYu170py6DybQ98qHnOe4uOO9Occdv34wXNcylPU4MOaUrFaFIqEF QyUwaQCzkUreLewUb65O/2FkyHZCsYIC+P7rDhTkNOHywb14urwZ7AfQ964dxLj4 Cnnc6LgI4+MFJeB8oxwyCWDC0Jx+DjuF4rhg981aRnqCZYa5HryDAQLD2BkYCZs= =nzdf -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org