Solved

How to find number of bytes written to STDOUT

Posted on 2000-04-10
1
241 Views
Last Modified: 2010-03-05
In a CGI script I write a lot of stuff to STDOUT. Is there an easy way to find how many bytes I have written after I've done it?
0
Comment
Question by:rj2
1 Comment
 
LVL 5

Accepted Solution

by:
PC_User321 earned 100 total points
ID: 2699389
After every print add the line
   $TotalLength += length "Put the same string that went to STDOUT in here.  (Variables are OK)";

Alternatively write everything that goes to STDOUT to a temp file too, and check the size of that file.

0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question