Re: Comparing strings

From: Lewis (g.krem...)

In message <2e499cd2-6522-4901-a7ff-[email protected]> ELCV <[email protected]> wrote:
> A new issue. I am evaluating my script so I am using echo to display the commands.

> My function is as follows:
> singleVolume(){
> # OS Volumes
> echo "virsh suspend $ARG"
> echo "dd if=/dev/vg0/$ARG_0 | ssh [email protected] dd of=/backup/images/$ARG_0.img"
> echo "virsh resume $ARG"
>}

> When I run my command the $ARG variable in the second line is not echoed:

Because you are specifying a variable named $ARG_0 try

echo "if=/dev/vg0/${ARG}_0 ..."


--
You know what they say about paradigms: Shift happens.

Share |
Comparing strings... by ELCV on Jul 13th 2021, 17:46
Re: Comparing strings... by Grant Taylor on Jul 13th 2021, 20:29
Re: Comparing strings... by ELCV on Jul 14th 2021, 01:53
Re: Comparing strings... by ELCV on Jul 14th 2021, 15:42