Unix Technical Forum

Oddity In stty

This is a discussion on Oddity In stty within the Debian Linux Users forum forums, part of the Debian Linux category; --> I can't figure this out. Why does the first pipeline suceed but the second fails? I'm running an up-to-date ...


Go Back   Unix Technical Forum > Unix Operating Systems > Debian Linux > Debian Linux Users forum

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-05-2008, 11:54 AM
David L. Craig
 
Posts: n/a
Default Oddity In stty

I can't figure this out. Why does the first pipeline suceed but the second fails?
I'm running an up-to-date Sid.

dlc@muse:~$ fold -w `stty -a | head -1 | awk '{print $7}' | tr -d ';'` < /dev/null
dlc@muse:~$ cat /dev/null | fold -w `stty -a | head -1 | awk '{print $7}' | tr -d ';'`
stty: standard input: Invalid argument
fold: option requires an argument -- w
Try `fold --help' for more information.
dlc@muse:~$

--

May the LORD God bless you exceedingly abundantly!

Dave Craig

- - - - - - - - - - - - - - - - - - - -
"'So the universe is not quite as you thought it was.
You'd better rearrange your beliefs, then.
Because you certainly can't rearrange the universe.'"

--from _Nightfall_ by Asimov/Silverberg


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 09-05-2008, 11:54 AM
David L. Craig
 
Posts: n/a
Default Re: Oddity In stty

On Sun, 2008-08-31 at 17:35 -0400, David L. Craig wrote:
> I can't figure this out. Why does the first pipeline suceed but the second fails?
> I'm running an up-to-date Sid.
>
> dlc@muse:~$ fold -w `stty -a | head -1 | awk '{print $7}' | tr -d ';'` < /dev/null
> dlc@muse:~$ cat /dev/null | fold -w `stty -a | head -1 | awk '{print $7}' | tr -d ';'`
> stty: standard input: Invalid argument
> fold: option requires an argument -- w
> Try `fold --help' for more information.
> dlc@muse:~$


Well, I figured out a way around it: stty -a </dev/tty
Solaris behaves similarly. I'm surprised this isn't
documented behavior.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 09-05-2008, 11:54 AM
Henrique de Moraes Holschuh
 
Posts: n/a
Default Re: Oddity In stty

On Sun, 31 Aug 2008, David L. Craig wrote:
> On Sun, 2008-08-31 at 17:35 -0400, David L. Craig wrote:
> > I can't figure this out. Why does the first pipeline suceed but the second fails?
> > I'm running an up-to-date Sid.
> >
> > dlc@muse:~$ fold -w `stty -a | head -1 | awk '{print $7}' | tr -d ';'` < /dev/null
> > dlc@muse:~$ cat /dev/null | fold -w `stty -a | head -1 | awk '{print $7}' | tr -d ';'`
> > stty: standard input: Invalid argument
> > fold: option requires an argument -- w
> > Try `fold --help' for more information.
> > dlc@muse:~$

>
> Well, I figured out a way around it: stty -a </dev/tty
> Solaris behaves similarly. I'm surprised this isn't
> documented behavior.


You can file a wishlist bug against coreutils, asking for the documentation
update...

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads for: Oddity In stty

Thread Thread Starter Forum Replies Last Post
stty erase zarif Solaris Sunhelp 9 06-30-2008 09:27 AM
stty erase Brian Hechinger Solaris Sunhelp 2 06-30-2008 09:27 AM
stty erase Ledger, David Solaris Sunhelp 0 06-30-2008 09:27 AM
Help with man stty Joaco Slackware Linux Support 1 02-20-2008 09:11 AM
stty erase John Smith comp.unix.solaris 0 01-07-2008 07:27 PM


All times are GMT. The time now is 08:01 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com