* lawson whitney <[EMAIL PROTECTED]> writes:
> On 25 Jul 2000, Steve Youngs wrote:
>> Would it be possible to give the XTerm a certain title (xterm
>> --title="Script Output") and then redirect to that XTerm using the
>> title? How would you go about it?
>>
> You're making things difficult, tagging the xterm, when the pty is
> connected to the shell it is running, not to the xterm.
> This is sort of like cracking a walnut with a piledriver and two feather
> pillows, but it works as long as the xterm is idle and the shell is its
> only child process:
> #!/bin/sh
> ppid=$(find /proc -name cmdline |xargs -i sh -c "grep \
> 'Script Output' {} >/dev/null && echo {}|cut -d / -f 3")
> pid=$(find /proc -name status |xargs -i sh -c "grep -x \
> -e PPid:[[:space:]]\*$ppid {} &>/dev/null && echo {}|cut -d / -f 3")
> echo "Eureka" >/proc/$pid/fd/0
The little script gives me heaps of "Permission Denied" errors as it
is searching through /proc
And echo "Eureka" >/proc/$pid/fd/0 yields...
bash: /proc//fd/0: No such file or directory
Obviously because find failed. Oh well, it's a start and it will give
me something to work on. Thanks Lawson.
===========================
Want to really learn Linux?
... Install Slackware
===========================
--
|---<Regards, Steve Youngs>-----------[GnuPG KeyID: EFD82ED2]---|
| Genius is the ability to |
| reduce the complicated to the simple |
|-----------------------------<mailto:[EMAIL PROTECTED]>---|
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs