According to Kenneth Stephen: While burning my CPU.
> 
> Mike wrote:
> 
> > On Wed, 12 Aug 1998, Kenneth Stephen wrote:
> >
> > > Hi,
> > >
> > >     I have a shell script which attempts to write a message to a tty
> > > from a job scheduled with 'at'. When I execute this script from the
> > > foreground, the message is written out to the correct tty perfectly.
> > > However, when it is scheduled with 'at', nothing gets written out. Any
> > > ideas why, or how I can fix this? Here is my script :
> > >
> > > #!/bin/bash
> > >
> > > write pgmr ttyp0 <<-!!
> > >         Hi there! This is a message from your friendly neighbourhood
> > >                 S P I D E R M A N.
> > > !!
> > >
> > When the at job runs, is pgmr logged in on ttyp0?  Do you have permission
> > to write to ttyp0?
> >
> 
> Mike,
> 
>     Unfortunately, that is the crux of the problem. I do have write
> permissions, but subsequent to my posting my message, I discovered that my
> job was failing with an 'unable to find your tty' error. The error message
> makes sense because I was not logged on at the time. However, that is one of
> my requirements : my job should be able to work even when I am logged off.
> 
>     I also had another idea : maybe I could 'cat' my message to the tty. But
> I couldnt seem to get this to work.

cat will work, but your message will need to be in a file, then using;
cat file.foo > /dev/ttyp0 should do it if you have permission.

> 
> Kenneth
> 
> 
> --
> There is no such thing as luck. 'Luck' is nothing but an absence of bad luck.
> 
> 
> 


-- 
Regards Richard.
[EMAIL PROTECTED]

Reply via email to