I know these questions might have been asked somewhere but their solutions don't really work. I need help.
I want to add a variable to a directory name then change directory to it. The approach below did not work for me.
#!/bin/bash
targetVmwareVersion="15.5.6"
cd vmware-host-modules-workstation-$targetVmwareVersion
If I replace cd with ls, it lists contents of the folder on the terminal but the cd does not work.
I want the targetVmwareVersion to be concatenated after the name vmware-host-modules-workstation- then change directory.
I have tried the approach below but it didn't work.
#!/bin/bash
targetVmwareVersion="15.5.6"
path="vmware-host-modules-workstation-$targetVmwareVersion"
cd $path
The cd part does not work. The directory does not change.
. ./script does not work for me. The snippet above is part of my large script which depends on that snippet to proceed.
