From: J L. T. <jlt...@ma...> - 2023-07-27 20:06:29
|
Hi, Can someone with a Linux machine please take a look at this? I want to replace the bash script I'm using to extract terminal dimensions with a nrx pipeline (see attached bash scripts), but I get no output from the command stage when I execute stty. The nrx pipeline is much simpler than the bash one, but there's something strange about stty. Perhaps it writes directly to the terminal instead of to stdout? If so, (how) could the command stage capture it? Do we need a <tty stage instead? Anyway, here are the nrx pipelines: | $ pipe 'command stty --all|take first 1|specs word 5 next|strip trailing string /;/|console' # should return #rows | rc=0 | $ pipe 'command stty --all|take first 1|specs word 7 next|strip trailing string /;/|console' # should return #columns | rc=0 In fact, just | $ pipe 'command stty --all|console' | rc=0 produces no output at all, while running stty --all directly in the terminal produces | $ stty --all | speed 38400 baud; rows 54; columns 120; line = 0; | intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; | stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0; | -parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts | -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -ixon -ixoff -iuclc -ixany -imaxbel iutf8 | opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 | isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc | rc=0 Leslie -- Platform: Linux Distribution: openSUSE Leap 15.4 (x86_64) java version "19.0.1" 2022-10-18 Java(TM) SE Runtime Environment (build 19.0.1+10-21) Java HotSpot(TM) 64-Bit Server VM (build 19.0.1+10-21, mixed mode, sharing) NetRexx portable processor 4.05-beta build 62-20230422-0022 |