Hi Felix, On Mon, Jul 8, 2013 at 4:09 AM, 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?
Try this one: echo $DISPLAY | cut -d: -f2 Regards, -- Mark Goldstein -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org