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? -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org