How would you parse the copy to dom0 command using variables?
Specifically ‘cat $src_path’ > file/path/here?
The script below takes appVm and file name inputs, and tries to parse them into the copy to dom0 command.
All parts to the parsing work, except when ‘cat $src_path’ >.
Any ideas what the proper syntax of this line should be?
qvm-run --pass-io $src_vm 'cat $src_path' > $d_path
Full script in context:
#!/bin/sh ### copy to dom0 src_file_fldr='/home/user/Documents/' d_file_fldr='/home/a1/Documents/' echo "Source file must be in appVm $src_file_fldr" read -e -p "Enter the source appVm name: " src_vm read -e -p "Enter the source file name: " src_file src_path=$src_file_fldr$src_file echo 'Source path: '$src_path d_path=$d_file_fldr$src_file echo 'Dom0 path: '$d_path # qvm-run --pass-io $src_vm 'cat /home/user/Documents/t2.sh' > $d_path ###^^^^ manually entering the file path works. qvm-run --pass-io $src_vm 'cat $src_path' > $d_path ####^^^^ trying to use a variable doesn't. echo 'Copied from '$src_vm' '$src_path' 'to' '$d_path