help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] Understanding read -r


From: Bob Proulx
Subject: Re: [Help-bash] Understanding read -r
Date: Thu, 27 Sep 2012 11:03:54 -0600
User-agent: Mutt/1.5.21 (2010-09-15)

Peng Yu wrote:
> The following example shows that "\" at the line end means line
> continuation. Is this wrong? Or I misunderstand the document?

You forgot to quote the EOF part.  See the stackoverflow reference.
Therefore the shell interpreted the string contents before 'read'
processing.

> read -r -d '' VAR <<EOF

Add quotes there.

  read -r -d '' VAR <<'EOF'

Again, this has to do with the here-document part and not the 'read' part.

Bob



reply via email to

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