[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Here document and stdin?

From: Michael Witten
Subject: Re: Here document and stdin?
Date: Thu, 23 Sep 2010 16:08:14 -0500

On Sun, Aug 15, 2010 at 19:55, Mike Frysinger <address@hidden> wrote:
> On Sun, Aug 15, 2010 at 8:47 PM, Peng Yu wrote:
>> cat file.txt | sqlite3 main.db <<EOF
> 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.
> cat file.txt - <<EOF | sqlite3 main.db
> ...

However, that does not achieve what Peng Yu wants; indeed, it would
seem that Peng Yu is confusing Bash's Here Documents with Perl's

My suggestion is to use bash quoting and escaping as necessary; as
with Perl, Bash strings may span multiple lines.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]