Hi, i want to ask about back script syntax.

As you can see below, i set variable vmrestartt which runs complex script command vzctl ***

I want to ask if it mean that when i define this variable, the command/script (vzctl ***) in this variable is executed in full? so i dont need to call it on new line like:

vmrestartt=$(vzctl restart $ctid)
if [[ "$vmrestartt" == *"exited with status 7"* ]];then
vzctl chkpnt $ctid --kill
sleep 10
vzctl --verbose restart $ctid
this command should 1) kill virtual machine checkpoint and 2) restart virtual machine if during classic virtual machine restart an error message (exitted with status...) appear... Thank you

thank you