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
8
votes
1 answer

How do I get Ruby awesome_print to file?

I am trying to get awesome_print to output to a file rather than the console but I cant find out how to do this? require "awesome_print" mySymbolizedHash = {'blah' => 'blabbbb', 'this' => 'that'} This will write to console, I need to write the…
8
votes
3 answers

Parsing the output of Bash's time builtin

I'm running a C program from a Bash script, and running it through a command called time, which outputs some time statistics for the running of the algorithm. If I were to perform the command time $ALGORITHM $VALUE $FILENAME It produces the…
8
votes
2 answers

Hide terminal output from Execve

I'm making a C program where it basically reads in a line from the user, interprets it and then tries to execute the command with execve. I'm also forking the execve to a child process if '&' is in the input. Now I wish to hide any terminal output…
log234
  • 93
  • 1
  • 6
8
votes
6 answers

Align text to right in C

I am little struggling how to make my output to show like this: a aa aaa My current output shows this instead: a aa aaa Below are my code: void displayA(int a){ for(int i = 0; i < a; i++) printf("a"); } int main(void){ …
Salman2013
  • 93
  • 1
  • 2
  • 5
8
votes
3 answers

get meta description , title and image from url like facebook link sharing

my code is function getTitle($Url){ $str = file_get_contents($Url); if(strlen($str)>0){ preg_match("/\(.*)\<\/title\>/",$str,$title); return $title[1]; } …
Steve Bals
  • 1,949
  • 6
  • 22
  • 32
8
votes
2 answers

How to store output in a variable while using expect 'send' command

Thanks. But the account and password are needed. So I must send them and then send ovs-vsctl command. the scripts are something like this: spawn telnet@ip expect -re "*login*" { send "root" } expect -re "password*" { send…
user3153829
  • 81
  • 1
  • 1
  • 3
8
votes
4 answers

Gathering all the unique values from one column and outputting them in another column..?

I have this form of a spreadsheet: A B C D abc abc abc 1 def ghi jkl 1 mno pqr stu 3 vwx yza bcd 4 mno pqr stu 5 mno pqr stu 5 vwx yza bcd 5 mno pqr stu 1 Where the first 3 columns are just data of type string. The column D has integers which…
PhysLabTsar
  • 256
  • 2
  • 5
  • 11
8
votes
4 answers

How to output the response HTML data by a jQuery AJAX request?

I have an online shop with a shopping cart. The cart, which is a , refreshes its content after adding an article to the cart. I use jQuery's AJAX method which receives HTML as a response from the called PHP script. Firebug's console…
Tomkay
  • 5,120
  • 21
  • 60
  • 92
7
votes
2 answers

Output redirection with "screen" command

Might be a simple problem, but I am running CentOS 5.4 command line remotely. I want to redirect the output of a simple Java file, lets say loop to print a hundred thousand numbers in console to a text file. The thing is, I have to use the 'screen'…
javaCity
  • 4,288
  • 2
  • 25
  • 37
7
votes
1 answer

Write-Information does not appear to work in powershell foreach-object -parallel

I am new to powershell and just learning it. I have some experience in C#. I am trying to use the foreach-object -Parallel option but cant get all the Write-* functions to work. function writeTest { 1..1 | ForEach-Object -Parallel { …
7
votes
1 answer

Is there a way to set a file name when jspdf output()

My site draws a column chart. I have a button to save it as a PDF file showing it before saving. The way it works now is this. google.visualization draws the chart. html2canvas takes a screenshot of the chart. jsPDF inserts the screenshot in a PDF…
7
votes
3 answers

.o vs .out in C

I compile C code using gcc in a debian system. Normally, I would use gcc file.c -o file.out. But I mistakenly typed gcc file.c -o file.o . When, running ./file.o it still worked! What is this .o file, is it same as .out?
7
votes
3 answers

Why does the program print the height value 0 instead of the one I set?

I am confused about how are the methods and constructors called at runtime, since the derived constructor is printed 3 times and the height is printed 0 I have tried printing some messages inside methods and constructors as to know what exactly is…
jashgopani
  • 565
  • 7
  • 13
7
votes
2 answers

Can a process read its own "standard out" stream?

How would a process read its own output stream? I am writing automated tests which start a few application sub-processes (applications) in the same process as the test. Therefore, the standard out is a mix of test output and application output. …
thebiggestlebowski
  • 2,610
  • 1
  • 33
  • 30
7
votes
1 answer

Promise - start - await: output order

Is the order of the values returned by await always relative to the input order? my @aoa = ( qw<1 a>, qw<2 b>, qw<3 c>, qw<4 d>, qw<5 e>, qw<6 f>, qw<7 g>, qw<8 h>, qw<9 i>, ); my @portions = ( ( 0, 2 ), ( 3, 5 ), ( 6, 8 ) ); my…
sid_com
  • 24,137
  • 26
  • 96
  • 187