Input:
sudo bash -c '>> /media/$USER/rootfs/etc/profile'
Output:
bash: /media/root/rootfs/etc/profile: No such file or directory
Input:
TEST=$USER
sudo bash -c '>> /media/$TEST/rootfs/etc/profile'
Output:
bash: /media//rootfs/etc/profile: No such file or directory
Instead of:
/media/riccardo/rootfs/etc/profile
How can I solve the problem?
test='foo;bar'; bash -c "echo $test"
– ilkkachu Mar 14 '20 at 13:26