Re: Here document and stdin?

2010-09-23 Thread Michael Witten
On Sun, Aug 15, 2010 at 19:55, Mike Frysinger wrote: > On Sun, Aug 15, 2010 at 8:47 PM, Peng Yu wrote: >> cat file.txt | sqlite3 main.db < > you only get 1 stdin ... either via the pipe or the heredoc.  give > everything you want to the first cat and worry about sqlite only > consuming the pipe. >

Re: Here document and stdin?

2010-08-15 Thread Mike Frysinger
On Sun, Aug 15, 2010 at 8:47 PM, Peng Yu wrote: > cat file.txt | sqlite3 main.db <

Here document and stdin?

2010-08-15 Thread Peng Yu
Here, I have the following working sql script, which takes /dev/stdin as input. Then I want to convert it to a here document. But it doesn't work, as shown below. I think that this may not be a sqlite3 problem. Rather, it may be because I don't use here document and pipe correctly. Could any bash

Re: here document and STDIN

2006-05-23 Thread Paul Jarc
"Cai Qian" <[EMAIL PROTECTED]> wrote: > The information is helpful. The problem by using > > perl -e ' >X > ' > > is that there seems no way to using single quota in Perl code any more. It's not very concise, but you can do this: perl -e ' ... '\'' ... ' >From the shell's point of vi

Re: here document and STDIN

2006-05-23 Thread Cai Qian
The information is helpful. The problem by using perl -e ' X ' is that there seems no way to using single quota in Perl code any more. On 5/23/06, Paul Jarc <[EMAIL PROTECTED]> wrote: "Cai Qian" <[EMAIL PROTECTED]> wrote: > For following code, > > sh < read > EOF > > I have no ide

Re: here document and STDIN

2006-05-23 Thread Paul Jarc
I wrote: > sh < read <&3 > EOF Sorry, that first line should be: sh 3<&0

Re: here document and STDIN

2006-05-23 Thread Paul Jarc
"Cai Qian" <[EMAIL PROTECTED]> wrote: > For following code, > > sh < read > EOF > > I have no idea why will not block. The "read" command reads from the shell's stdin, which is the here document. At the point where the "read" command is executed, the shell has already read the "read" comman

here document and STDIN

2006-05-23 Thread Cai Qian
Hi, For following code, sh