5 ms·
You're right about the ability to comment, but it doesn't save you from the tedious commas: drive_args=( file=/export/cirros.qcow2, format=qcow2,
by jolmg 8y ago
You're right about the ability to comment, but it doesn't save you from the tedious commas:
drive_args=(
file=/export/cirros.qcow2,
format=qcow2,
if=virtio
)
qemu_args=(
-display none
-m 2048
-serial stdio
-drive "$(printf "%s" "${drive_args[@]}")"
)
qemu-system-x86_64 "${qemu_args[@]}"
Personally, I prefer it with the backslashes if I don't need to comment.