[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] bash variable interpolation
From: |
Dave Rutherford |
Subject: |
Re: [Help-bash] bash variable interpolation |
Date: |
Thu, 19 Mar 2015 20:03:01 -0400 |
On Thu, Mar 19, 2015 at 7:37 PM, Peng Yu <address@hidden> wrote:
> On Thu, Mar 19, 2015 at 5:42 PM, Eric Blake <address@hidden> wrote:
>> On 03/19/2015 04:04 PM, Peng Yu wrote:
>>> I want to interpolate variable in a bash string variable. But the
>>> following code shows the spaces are not maintained.
>>
>> Insufficient quoting on your part.
>>
>>> There is some
>>> built-in features in perl to do string interpolation. Does anyone know
>>> the best way to do string interpolation in bash? Thanks.
I feel dumb. What is meant by `string interpolation'?
> The real problem is that I want to replace some bash variables in a
> file and then print the output.
Can you arrange things so that the file is given as a here-document?
Here-documents are treated to variable expansion, and the results
ought to be safe regardless of the variable contents.
- [Help-bash] bash variable interpolation, Peng Yu, 2015/03/19
- Re: [Help-bash] bash variable interpolation, Eduardo A . Bustamante López, 2015/03/19
- Re: [Help-bash] bash variable interpolation, Peng Yu, 2015/03/19
- Re: [Help-bash] bash variable interpolation, Eduardo A . Bustamante López, 2015/03/19
- Re: [Help-bash] bash variable interpolation, Greg Wooledge, 2015/03/20
- Re: [Help-bash] bash variable interpolation, Peng Yu, 2015/03/20
- Re: [Help-bash] bash variable interpolation, Dan Douglas, 2015/03/21