Write output from background.

Write output from background.

Post by Karen Lindse » Sat, 22 Feb 1997 04:00:00



I am using 'write' to give me mail notification (among other things), using
a ~/.forward entry to run a ksh script, since 'biff y' does not seem to work
for me under AIX (after a 'mesg y').

Unfortunately when mail arrives 'write' gives me a line:

Message from klindsey on ibm_server (UNKNOWN) [Thu 13 Feb 17:18:21 1997] ...

which takes the cursor to the right hand side of the screen and the rest of
the message appears as single characters in column 80.

I tried setting stty options in the script but, obviously, failed.

Any ideas?  TIA.

- KSL.  -

 
 
 

Write output from background.

Post by Icarus Spar » Sun, 23 Feb 1997 04:00:00




Quote:>I am using 'write' to give me mail notification (among other things), using
>a ~/.forward entry to run a ksh script, since 'biff y' does not seem to work
>for me under AIX (after a 'mesg y').

>Unfortunately when mail arrives 'write' gives me a line:

>Message from klindsey on ibm_server (UNKNOWN) [Thu 13 Feb 17:18:21 1997] ...

>which takes the cursor to the right hand side of the screen and the rest of
>the message appears as single characters in column 80.

>I tried setting stty options in the script but, obviously, failed.

Getting the terminal to wrap automatically when it reaches the end of a line
is a function of the terminal, and can usually be enabled, often via a setup
screen or an escape sequence.

The best bet is not to generate long lines in the first place. AIX may have
the 'fmt' or 'fold' commands which can limit long lines, or you may be able
to use 'pr'.

Icarus