LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] preventing piped output being clipped

[ILUG] preventing piped output being clipped

Robert Elliott robert.elliott at alphyra.ie
Wed Sep 5 13:36:43 IST 2001


Stephen Shirley wrote:
> 
> Mornin',
>         Something has been annoying me for quite some time now, and I hope
> some of ye uber linux people can suggest a solution. Basically I'm piping
> the output of 'w' into another command - but it seems to insist in only
> outputing 80 chars width. To see what I mean vi a file with a long file
> name (anything greater than 11 will do) - this is just so the output of w
> will be greater than 80 chars. Then type w in a seperate terminal - and it
> works fine. However if you do 'w | less' or 'w > bla' you'll find that
> you're missing the end of that line. Now I assume this is because w is
> trying to be smart and is using isatty() on stdout. If so, is there anyway
> I can beat it into ignoring that, or any other solution?

A number of such commands are quite tolerant of redirection with the
addition of a command line option or two; ps, for example.
You can find what your missing by adding a w (ps auxw, for example). If
the output isn't enough, you can add 'w's to taste.


-- 
|Robert Elliott                          |robert at alphyra.ie        |
|Systems Administrator, Alphyra Group    |                         |
|http://www.alphyra.ie                   |http://robertelliott.org |
|        Entia non sunt multiplicanda praeter necessitatem         |




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell