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
9797 questions
3112
votes
65 answers

How do I print colored text to the terminal?

How do I output colored text to the terminal in Python?
aboSamoor
  • 31,331
  • 3
  • 17
  • 10
408
votes
33 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
  • 4,455
  • 4
  • 19
  • 17
347
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,525
  • 6
  • 38
  • 79
302
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
  • 4,653
  • 3
  • 20
  • 15
257
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
  • 4,049
  • 6
  • 22
  • 30
228
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,317
  • 3
  • 16
  • 8
212
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
  • 479,566
  • 201
  • 878
  • 984
201
votes
8 answers

vbscript output to console

What is the command or the quickest way to output results to console using vbscript?
Regmi
  • 2,658
  • 4
  • 24
  • 32
177
votes
6 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
  • 8,165
  • 17
  • 59
  • 91
149
votes
3 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
  • 118,144
  • 57
  • 340
  • 684
145
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,711
  • 3
  • 20
  • 18
142
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,694
  • 2
  • 12
  • 10
132
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,949
  • 8
  • 36
  • 49
117
votes
3 answers

Output grep results to text file, need cleaner output

When using the Grep command to find a search string in a set of files, how do I dump the results to a text file? Also is there a switch for the Grep command that provides cleaner results for better readability, such as a line feed between each entry…
user2398188
  • 1,417
  • 3
  • 12
  • 12
110
votes
1 answer

Xcode - how to see build command and log?

I have build errors in my Xcode project (Objective-C), and I no longer "stumble upon" the build command string nor the build output logs. This is Xcode 6.3.1. All I can inspect is a left-side panel listing errors/warnings. I want the build command…
starlocke
  • 3,407
  • 2
  • 25
  • 38
1
2 3
99 100