Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: mcvax!cs.vu.nl!maart@uunet.uu.net (Maarten Litmaath) Newsgroups: comp.sys.sun Subject: Re: `stty speed` problem under 4.0 ?? Keywords: SunOS Message-ID: <132@brazos.Rice.edu> Date: 11 Jul 89 02:04:05 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 19 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 71, message 4 of 18 eho@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@cs.vu.nl, mcvax!botter!maart