Questions tagged [output]

The externally observable consequences of calling a program on some input

The output of a program is the set of externally observable consequences of running a program on the given input.

A program's output can be manifested in several forms:

  1. What is printed to and/or
  2. What is written to an external file
  3. What changes are made to the inputs, which are then used in other functions or programs
8691 questions
2487
votes
51 answers

How to print colored text to the terminal?

How can I output colored text to the terminal in Python?
aboSamoor
  • 25,055
  • 3
  • 15
  • 10
515
votes
12 answers

How can I see normal print output created during pytest run?

Sometimes I want to just insert some print statements in my code, and see what gets printed out when I exercise it. My usual way to "exercise" it is with existing pytest tests. But when I run these, I don't seem able to see any standard output (at…
Des
  • 6,025
  • 3
  • 15
  • 20
346
votes
1 answer

What is 'YTowOnt9'?

Our (PHP) framework sometimes renders hidden inputs with value YTowOnt9. I can't find that string anywhere in the (huge) codebase, and can't figure out where it came from. I decided to Google for that particular string, and the result surprised me.…
Sherlock
  • 7,153
  • 6
  • 33
  • 72
318
votes
27 answers

How do I print out the contents of a vector?

How do I print out the contents of a std::vector to the screen? A solution that implements the following operator<< would be nice as well: template std::ostream &…
forthewinwin
  • 3,555
  • 4
  • 17
  • 17
258
votes
5 answers

How to pipe stdout while keeping it on screen ? (and not to a output file)

I would like to pipe standard output of a program while keeping it on screen. With a simple example (echo use here is just for illustration purpose) : $ echo 'ee' | foo ee <- the output I would like to see I know tee could copy stdout to file but…
gentooboontoo
  • 3,893
  • 2
  • 17
  • 14
222
votes
6 answers

How to get a specific output iterating a hash in Ruby?

I want to get a specific output iterating a Ruby Hash. This is the Hash I want to iterate over: hash = { 1 => ['a', 'b'], 2 => ['c'], 3 => ['d', 'e', 'f', 'g'], 4 => ['h'] } This is the output I would like to…
sts
  • 2,257
  • 3
  • 15
  • 8
192
votes
13 answers

How to create multiple output paths in Webpack config

Does anyone know how to create multiple output paths in a webpack.config.js file? I'm using bootstrap-sass which comes with a few different font files, etc. For webpack to process these i've included file-loader which is working correctly, however…
spb
  • 3,278
  • 5
  • 19
  • 26
186
votes
10 answers

What is the difference between printf() and puts() in C?

I know you can print with printf() and puts(). I can also see that printf() allows you to interpolate variables and do formatting. Is puts() merely a primitive version of printf(). Should it be used for every possible printf() without string…
alex
  • 438,662
  • 188
  • 837
  • 957
174
votes
6 answers

vbscript output to console

What is the command or the quickest way to output results to console using vbscript?
Regmi
  • 2,368
  • 4
  • 22
  • 32
132
votes
5 answers

CMake output/build directory

I'm pretty new to CMake, and read a few tutorials on how to use it, and wrote some complicated 50 lines of CMake script in order to make a program for 3 different compilers. This probably concludes all my knowledge in CMake. Now my problem is that I…
The Quantum Physicist
  • 21,050
  • 13
  • 77
  • 143
128
votes
4 answers

cURL suppress response body

Is it possible instruct cURL to suppress output of response body? In my case, the response body is an HTML page, which overflows the CLI buffer, making it difficult to find the relevant information. I want to examine the other parts of the output…
BaltoStar
  • 6,511
  • 13
  • 46
  • 67
128
votes
2 answers

How can I suppress column header output for a single SQL statement?

I'm executing some SQL statements in batch (using the mysql command-line binary). I want one of my several SELECT statements to not print the column headers, just the selected records. Is this possible?
einpoklum
  • 86,754
  • 39
  • 223
  • 453
121
votes
8 answers

Can Maven be made less verbose?

Maven spews out far too many lines of output to my taste (I like the Unix way: no news is good news). I want to get rid of all [INFO] lines, but I couldn't find any mention of an argument or config settings that controls the verbosity of Maven. Is…
Asaf Bartov
  • 2,401
  • 3
  • 19
  • 17
109
votes
3 answers

What does flushing the buffer mean?

I am learning C++ and I found something that I can't understand: Output buffers can be explicitly flushed to force the buffer to be written. By default, reading cin flushes cout; cout is also flushed when the program ends normally. So flushing…
Mohamed Ahmed Nabil
  • 3,389
  • 8
  • 32
  • 48
108
votes
3 answers

Don't display pushd/popd stack across several bash scripts (quiet pushd/popd)

Each time I use pushd or popd, it print the stack to standard output. How not to do so? I don't want to do pushd > /dev/null each time because I have a lot of scripts calling each other. Maybe a nice override will do it, but I'll need to override…
bemug
  • 1,324
  • 2
  • 9
  • 10
1
2 3
99 100