[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Assigning to a variable using here document?
From: |
Greg Wooledge |
Subject: |
Re: [Help-bash] Assigning to a variable using here document? |
Date: |
Thu, 27 Sep 2012 11:38:54 -0400 |
User-agent: |
Mutt/1.4.2.3i |
On Thu, Sep 27, 2012 at 10:14:14AM -0500, Peng Yu wrote:
> In perl, the following code can be used to assign a variable using
> here document.
>
> my $shell_script_stdout = <<`END`;
> echo foo
> echo bar
> END
>
> But I don't see this in bash. Is there something similar available in
> bash? Thanks!
some_var='This is a
multi-line
variable'
some_other_var="This is a
multi-line variable
with $variable $components
inside it"