Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing terminal to record/save a data stream
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COFor the record, the syntax you were using would send the output of `cat` to `file.txt`, and then it would also try to send that output to the standard input of `curl` (but it couldn't, because that output was already going to the file). Problem 1: `cat` doesn't produce any output other than what it reads from its own standard input, so it would just sit there waiting for you to type something. Problem 2: `curl` doesn't read what comes into its standard input. And problem 3: you're not redirecting the output of `curl` anywhere, so it just gets printed to the screen.
      singulars
    2. COAnswers below are good. Still, I suggest you read a little on I/O redirection. That may help you a lot next time: http://en.wikipedia.org/wiki/Redirection_%28computing%29
      singulars
    3. CO@David: Good explanation +1. I think that what would happen is that the shell would parse to the pipe, and set up the pipe with the 'cat' process's output connected to it. The 'cat' shell process would then do the output redirection (closing the pipe in the process), so 'curl' would get no data on its input. The 'cat' would sit there waiting for EOF on its input; meanwhile, 'curl' would generate its output to standard output, not the file. Very minor difference from what you describe - it is the sequence of 'open pipe; fork; close pipe; open file' that is not quite what I read in yours.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload