Re: Comparing strings

Lewis <[email protected]> Wed, 14 Jul 2021 23:34:10 -0000 (UTC)
Newsgroups alt.comp.lang.shell.unix.bourne-bash
Organization Miskatonic U
Message-ID <[email protected]>
In message <[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.