V
V
VN2022-04-14 16:33:59
bash
VN, 2022-04-14 16:33:59

Why is the name of the variables not displayed completely?

There are variables from which the name should be added

snap_date=$(date +%F)
dom="Ubuntu-node2"
snap_name="${dom}_${snapdate}_${snap_num}"

echo $snap_name


The output should be:

Ubuntu-node2_2022-04-14_s9

And in the end I get

Ubuntu-node2_

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mureevms, 2022-04-15
@mureevms

1. Snap_num variable not defined
2. snap_date != snapdate

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question