How to grab data from stdout terminal

This is a discussion on How to grab data from stdout terminal within the shell forums in Operating Systems category; Hi, I am using solaris and As I know stdout is also file (system file), so it means whatever printed data on terminal should be store somewhere by OS. I want to where the OS stores all this data ??? Assume while launch my script i didnt provide any redirection option store terminal output to some file now if i want to grab output printed on terminal then manually i have to select the portion and copy paste... that is fine, but is there any option other then this ??? I cannot run same script again to grab things... Thanks in advance....

Go Back   Database Forum > Operating Systems > shell

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-27-2008, 03:14 AM
Default How to grab data from stdout terminal

Hi,

I am using solaris and

As I know stdout is also file (system file), so it means whatever
printed data on terminal should be store somewhere by OS.

I want to where the OS stores all this data ???

Assume while launch my script i didnt provide any redirection option
store terminal output to some file

now if i want to grab output printed on terminal then manually i have
to select the portion and copy paste...

that is fine, but is there any option other then this ???

I cannot run same script again to grab things...

Thanks in advance.
Reply With Quote
  #2  
Old 08-27-2008, 04:01 AM
Default Re: How to grab data from stdout terminal

Bhavik wrote:
> Hi,
>
> I am using solaris and
>
> As I know stdout is also file (system file), so it means whatever
> printed data on terminal should be store somewhere by OS.


No, that is not true.

Janis

>
> I want to where the OS stores all this data ???
>
> Assume while launch my script i didnt provide any redirection option
> store terminal output to some file
>
> now if i want to grab output printed on terminal then manually i have
> to select the portion and copy paste...
>
> that is fine, but is there any option other then this ???
>
> I cannot run same script again to grab things...
>
> Thanks in advance.

Reply With Quote
  #3  
Old 08-27-2008, 09:39 AM
Default Re: How to grab data from stdout terminal

In article ,
Janis Papanagnou wrote:
>Bhavik wrote:
>> Hi,
>>
>> I am using solaris and
>>
>> As I know stdout is also file (system file), so it means whatever
>> printed data on terminal should be store somewhere by OS.

>
>No, that is not true.


Actually, it *is* true. But only for a short time...

To OP: The short answer is, no, you can't do it retroactively.
In future, look into logging tools, such as "script" or "expect".

Reply With Quote
  #4  
Old 08-27-2008, 04:25 PM
Default Re: How to grab data from stdout terminal

Janis Papanagnou wrote:
> Bhavik wrote:
>> Hi,
>>
>> I am using solaris and
>>
>> As I know stdout is also file (system file), so it means whatever
>> printed data on terminal should be store somewhere by OS.

>
> No, that is not true.
>
> Janis
>


BTW did you ever try

tail -f /dev/null

to watch what the folks throw away?


--
echo imhcea\.lophc.tcs.hmo |
sed 's2\(....\)\(.\{5\}\)2\2\122;s1\(.\)\(.\)1\2\11g;1 s;\.;::;2'
Reply With Quote
  #5  
Old 08-27-2008, 04:31 PM
Default Re: How to grab data from stdout terminal

On Wednesday 27 August 2008 21:25, Michael Tosch wrote:

> BTW did you ever try
>
> tail -f /dev/null
>
> to watch what the folks throw away?


That sounds interesting, however it does not seem to work on my system
(linux). tail -f doesn't print anything, even while other processes are
writing data to /dev/null. Is there something special that must be done for
getting that to work?

Reply With Quote
  #6  
Old 08-27-2008, 05:59 PM
Default Re: How to grab data from stdout terminal

In article , pk wrote:
>On Wednesday 27 August 2008 21:25, Michael Tosch wrote:
>
>> BTW did you ever try
>>
>> tail -f /dev/null
>>
>> to watch what the folks throw away?

>
>That sounds interesting, however it does not seem to work on my system
>(linux). tail -f doesn't print anything, even while other processes are
>writing data to /dev/null. Is there something special that must be done for
>getting that to work?
>


Sounds like you should file a bug report on this. What version of
"linux" are you running?

Reply With Quote
  #7  
Old 08-27-2008, 06:07 PM
Default Re: How to grab data from stdout terminal

On Wednesday 27 August 2008 22:59, Kenny McCormack wrote:

>>That sounds interesting, however it does not seem to work on my system
>>(linux). tail -f doesn't print anything, even while other processes are
>>writing data to /dev/null. Is there something special that must be done
>>for getting that to work?
>>

>
> Sounds like you should file a bug report on this. What version of
> "linux" are you running?


Is that ironic?
I'm using redhat.

Reply With Quote
  #8  
Old 08-27-2008, 06:25 PM
Default Re: How to grab data from stdout terminal

Michael Tosch wrote:
> Janis Papanagnou wrote:
>
>> Bhavik wrote:
>>
>>> Hi,
>>>
>>> I am using solaris and
>>>
>>> As I know stdout is also file (system file), so it means whatever
>>> printed data on terminal should be store somewhere by OS.

>>
>>
>> No, that is not true.
>>
>> Janis
>>

>
> BTW did you ever try
>
> tail -f /dev/null
>
> to watch what the folks throw away?
>
>


No. Typically I am only interested in the amount of zeroes in
their thrown away data, so I inspect only /dev/zero. If I want
to inspect their complete data I re-insert the 1's manually or
(in case of huge amounts of data) with help of some script.

Um.. - Janis
Reply With Quote
  #9  
Old 08-28-2008, 02:24 AM
Default Re: How to grab data from stdout terminal

Hi all,
Thanx a lot for the ans. . anyway i came to know abt new things as
well.
thanx again... (" ,)
On Aug 28, 2:25*am, Janis Papanagnou
wrote:
> Michael Tosch wrote:
> > Janis Papanagnou wrote:

>
> >> Bhavik wrote:

>
> >>> Hi,

>
> >>> I am using solaris and

>
> >>> As I know stdout is also file (system file), so it means whatever
> >>> printed data on terminal should be store somewhere by OS.

>
> >> No, that is not true.

>
> >> Janis

>
> > BTW did you ever try

>
> > tail -f /dev/null

>
> > to watch what the folks throw away?

>
> No. Typically I am only interested in the amount of zeroes in
> their thrown away data, so I inspect only /dev/zero. If I want
> to inspect their complete data I re-insert the 1's manually or
> (in case of huge amounts of data) with help of some script.
>
> Um.. - Janis


Reply With Quote
  #10  
Old 08-28-2008, 09:52 AM
Default Re: How to grab data from stdout terminal

pk wrote:
> On Wednesday 27 August 2008 22:59, Kenny McCormack wrote:
>
>>> That sounds interesting, however it does not seem to work on my system
>>> (linux). tail -f doesn't print anything, even while other processes are
>>> writing data to /dev/null. Is there something special that must be done
>>> for getting that to work?
>>>

>> Sounds like you should file a bug report on this. What version of
>> "linux" are you running?

>
> Is that ironic?
> I'm using redhat.
>


For the time being you should monitor the /dev/zero as Janis does.

--
echo imhcea\.lophc.tcs.hmo |
sed 's2\(....\)\(.\{5\}\)2\2\122;s1\(.\)\(.\)1\2\11g;1 s;\.;::;2'
Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 11:53 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by bbpixel2008 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.