On Thu, 27 Aug 2020 at 16:11:37 +, u...@net9.ga wrote:
> ExecStart=/bin/bash -c 'set -x; declare -r str="1 2"; echo ${str}; echo $str;
> exit 0;'
This seems to be behaving as documented:
Basic environment variable substitution is supported. Use "${FOO}" as
part of a word, or
27.08.2020 19:11, u...@net9.ga пишет:
> Consider
>
> [Unit]
> Description=Is it looking for ${} construct in the wrong place?
> [Service]
> Type=oneshot
> ExecStart=/bin/bash -c 'set -x; declare -r str="1 2"; echo ${str}; echo $str;
> exit 0;'
>
> When ran, the journal has:
>
> bash[14190]: +
Am 27.08.20 um 18:11 schrieb u...@net9.ga:
> [Unit]
> Description=Is it looking for ${} construct in the wrong place?
> [Service]
> Type=oneshot
> ExecStart=/bin/bash -c 'set -x; declare -r str="1 2"; echo ${str}; echo $str;
> exit 0;'
>
> When ran, the journal has:
>
> bash[14190]: +
Consider
[Unit]
Description=Is it looking for ${} construct in the wrong place?
[Service]
Type=oneshot
ExecStart=/bin/bash -c 'set -x; declare -r str="1 2"; echo ${str}; echo $str;
exit 0;'
When ran, the journal has:
bash[14190]: + declare -r 'str=1 2'
bash[14190]: + echo
bash[14190]: + echo