Tag Archives: QUESTION

Simply question about capturing output to /dev/tty

By Paul R

Suppose another person wrote the following one-line shell script:

echo $RANDOM > /dev/tty

QUESTION #1: How can the random number, which is output to the terminal by this script, be captured in a variable?

QUESTION #2: How can this be done in a cron job?

Specific code, whether in ksh or C, would be greatly appreciated.

———————————————————————

REAL LIFE STORY: We use software with concurrent licenses, which are managed on a UNIX server. The vendor supplies a program which simply displays the number of licenses currently being used, but it directs the output to /dev/tty (not stdout/stderr/file), and it is a compiled program so it cannot be directly altered using sudo permissions. I can only assume that the vendor is actively trying to prevent their customers from gathering statistics about their concurrent license usage, because the customer might find out they don’t need so many licenses, contract for fewer licenses, and thus the vendor would loose money. 😡 The vendor has to provide some mechanism for determining license usage, but it’s extremely limited. 🙁 I would like to gather statistics every 15 minutes, find the maximum concurrent license usage, so we can contract to the vendor for the ideal number of licenses. 😀 Any help you can provide would be greatly appreciated. Thanks! –Paul.

…read more

Source: FULL ARTICLE at The UNIX and Linux Forums

Ubuntu Classroom: Ubuntu Developer Week Starting Soon!

Each cycle, the Ubuntu Classroom team holds an event called the Ubuntu Developer Week. Here, you can be part of different workshops, where you will be able to learn about the different tools and processes in the Ubuntu Community, in respect of Development.

This cycle, the Ubuntu Developer Week will be held from Tuesday, January the 29th to Thursday, January the 31st, which is exactly a week from now. Sessions will include an introduction to Ubuntu Development and to patch systems, workshops on working with upstreams, writing applications, finding memory leaks and testing, and some explanations about the App Review process. It will all finish with a Developers Roundtable, where you will be able to hear experiences from other people, as well as sharing your own experiences. More information about the event and the full schedule can be found here.

Sessions will start at 15:00 UTC, and finish at 20:00 UTC. You can check the event timing on your local time zone here.

All classes will be given on #ubuntu-classroom on irc.freenode.net, and discussions and questions will take place on #ubuntu-classroom-chat on irc.freenode.net. If you have any questions, please make sure to prefix it with the word ‘QUESTION:’ (in capitals and without quotes) for the bot to take it.

If you think anyone may be interested on the event, make sure to share the links, and we’ll see you there!


Source: FULL ARTICLE at Planet Ubuntu