unix riddle
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > unix riddle




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    unix riddle  
puzzlecracker


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-21-05 11:00 PM

Say that when you run the Unix command junky in your shell, it spits
out a ton of text to the console, too much for your console buffer to
hold. How would you run it so that you can look at everything it
outputs after it finishes?






[ Post a follow-up to this message ]



    Re: unix riddle  
Lew Pitcher


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-21-05 11:00 PM

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

puzzlecracker wrote:
> Say that when you run the Unix command junky in your shell, it spits
> out a ton of text to the console, too much for your console buffer to
> hold. How would you run it so that you can look at everything it
> outputs after it finishes?
>
junky >~/junky.stdout  # run junky, send output to file
more ~/junky.stdout    # junky done, read output from file

- --
Lew Pitcher
IT Specialist, Enterprise Data Systems,
Enterprise Technology Solutions, TD Bank Financial Group

(Opinions expressed are my own, not my employers')
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)

 iD8DBQFCGkx9agVFX4UWr64RAsq9AJsG5pQ2KIbK
523P9WLEHJOBem1EMACcDuIb
QqC4vUmFzZNMy7BlIZqJ7Sw=
=Ddc6
-----END PGP SIGNATURE-----





[ Post a follow-up to this message ]



    Re: unix riddle  
Dragan Cvetkovic


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-21-05 11:00 PM

Lew Pitcher <Lew.Pitcher@td.com> writes:

> puzzlecracker wrote: 
>   junky >~/junky.stdout  # run junky, send output to file
>   more ~/junky.stdout    # junky done, read output from file

And hope that nothing gets been written to stderr?

Dragan

--
Dragan Cvetkovic,

To be or not to be is true. G. Boole      No it isn't.  L. E. J. Brouwer

!!! Sender/From address is bogus. Use reply-to one !!!





[ Post a follow-up to this message ]



    Re: unix riddle  
puzzlecracker


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-21-05 11:00 PM


Dragan Cvetkovic wrote:
> Lew Pitcher <Lew.Pitcher@td.com> writes:
> 
spits[vbcol=seagreen] 
to[vbcol=seagreen] 
>
> And hope that nothing gets been written to stderr?
>
> Dragan
>
> --
> Dragan Cvetkovic,
>
> To be or not to be is true. G. Boole      No it isn't.  L. E. J.
Brouwer
>
> !!! Sender/From address is bogus. Use reply-to one !!!

no worries about stderrr






[ Post a follow-up to this message ]



    Re: unix riddle  
Mark Rafn


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-21-05 11:00 PM

puzzlecracker <ironsel2000@gmail.com> wrote:
>Say that when you run the Unix command junky in your shell, it spits
>out a ton of text to the console, too much for your console buffer to
>hold. How would you run it so that you can look at everything it
>outputs after it finishes?

If you get a large, high-resolution monitor, you can set the text size REALL
Y
small, and still be able to read it.  You should be able to get three or fou
r
times the amount of information you used to.

Better yet, use a real teletype, as Unix was designed.  As long as
you don't run out of paper, you can scroll back as far as you want.

Alternately, you can use the power of Unix to answer such riddles - pipeline
s
of many commands can make life very easy.
junky | cat | rev | more | rev | cat | less
is likely to do the trick.  There may be more efficient ways, but they take
less typing.

p.s. you might try comp.unix.questions rather than comp.unix.programmer.  Th
is
isn't really a programming question.
--
Mark Rafn    dagon@dagon.net    <http://www.dagon.net/>
"America is at that awkward stage. It's too late to work within the system,
but too early to shoot the bastards." -- Claire Wolfe





[ Post a follow-up to this message ]



    Re: unix riddle  
Russell Shaw


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-22-05 01:50 AM

puzzlecracker wrote:
> Say that when you run the Unix command junky in your shell, it spits
> out a ton of text to the console, too much for your console buffer to
> hold. How would you run it so that you can look at everything it
> outputs after it finishes?

I just press Shift-PageUp and the screen scrolls to previous output as
far as i want.





[ Post a follow-up to this message ]



    Re: unix riddle  
Arjun Thounaojam


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-22-05 12:59 PM

I would use "script":

script /tmp/junky.output   #save console output to junky.output
junky                      #run junky
exit                       #exit script

less /tmp/junky.output     #read junky.output






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 05:46 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register