• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 526
  • Last Modified:

how to find what is printed to the UNIX STDOUT

Hello,

how to find what is printed to the UNIX STDOUT?

Thanks
0
bibi92
Asked:
bibi92
  • 2
  • 2
  • 2
  • +1
1 Solution
 
ozoCommented:
> stdout.log
0
 
Patrick BogersDatacenter platform engineer LindowsCommented:
Hi

Not totally confident i understand the question, you want to know what has been printed to the stdout?

A command like    cat /dev/stdout -less

Will show you its content. OR am i missing the issue here?
0
 
bibi92Author Commented:
yes, I want to know what has been printed to the stdout
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
bibi92Author Commented:
cat: 0652-050 Cannot open /dev/stdout.
cat: 0652-050 Cannot open -less.
0
 
ozoCommented:
stdout will be what is printed on the screen.
If you want to see what was printer their earlier, scroll up.
If you want to capture what what a command prints, redirect it to a file or logger
command | tee command.log
0
 
Patrick BogersDatacenter platform engineer LindowsCommented:
If you cannot open the file you probably have no forwarder in place and then standard output is printed to the screen.
0
 
SurranoSystem EngineerCommented:
You can always check whichever process you want if you know the pid (e.g. $MYPID)

tail -f /proc/$MYPID/fd/1 # stdout
tail -f /proc/$MYPID/fd/2 # stderr

Open in new window


But it'll show only future output, not past output.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now