`stty speed` problem under 4.0 ??
    Maarten Litmaath 
    mcvax!cs.vu.nl!maart at uunet.uu.net
       
    Tue Jul 11 12:04:05 AEST 1989
    
    
  
eho at bogey.princeton.edu (Eric Y.W. Ho) writes:
\Does anyone has this problem under 4.0.1 (on Sun-3's & Sun-4's) ?
\
\	cognito-root(3)-[/]: set xyz = `stty speed`
\	stty: Operation not supported on socket [...]
The output of the `backquote sub-shell' is connected with the parent
through a pipe (read: a socket).  The `stty' command is performing calls
to ioctl(2) on stdout, which isn't a terminal in this case. The output of
stty itself is sent to STDERR.  So, to achieve what you want, you need to
redirect that very stderr into the pipe, i.e. to stdout, and redirect
stdout to your terminal:
	set xyz = "`(stty speed > /dev/tty) |& cat`"
In sh:
	xyz="`stty speed 2>&1 > /dev/tty`"
 
   "... a lap-top Cray-2 with builtin    |Maarten Litmaath @ VU Amsterdam:
cold fusion power supply"  (Colin Dente) |maart at cs.vu.nl, mcvax!botter!maart
    
    
More information about the Comp.sys.sun
mailing list