Skip to main content
Rollback to Revision 1
Source Link
amphetamachine
  • 5.6k
  • 2
  • 38
  • 43

Just use proper quoting and string security.

You could even simplify it a little and shore up the quoting by not executing variables:

# Get list of virtual machines.  VMname will hold the address of the .vmx file
VMname="$(./vmrun list)"
echo "$VMname"

# Get list of snapshots
echo "./vmrun listSnapshots '$VMname'"
snapshotList="$(./vmrun listsnapshots "$VMName")"
# Get list of virtual machines.  VMname will hold the address of the .vmx file
VMname="$(./vmrun list)"
echo "$VMname"

# Get list of snapshots
echo "./vmrun listSnapshots '$VMname'"
snapshotList="$(./vmrun listsnapshots "$VMName")"

Just use proper quoting and string security.

You could even simplify it a little and shore up the quoting by not executing variables:

# Get list of virtual machines.  VMname will hold the address of the .vmx file
VMname="$(./vmrun list)"
echo "$VMname"

# Get list of snapshots
echo "./vmrun listSnapshots '$VMname'"
snapshotList="$(./vmrun listsnapshots "$VMName")"

Just use proper quoting and string security.

You could even simplify it a little and shore up the quoting by not executing variables:

# Get list of virtual machines.  VMname will hold the address of the .vmx file
VMname="$(./vmrun list)"
echo "$VMname"

# Get list of snapshots
echo "./vmrun listSnapshots '$VMname'"
snapshotList="$(./vmrun listsnapshots "$VMName")"
added 27 characters in body
Source Link
Caleb
  • 72k
  • 19
  • 203
  • 234

Just use proper quoting and string security.

You could even simplify it a little and shore up the quoting by not executing variables:

# Get list of virtual machines.  VMname will hold the address of the .vmx file
VMname="$(./vmrun list)"
echo "$VMname"

# Get list of snapshots
echo "./vmrun listSnapshots '$VMname'"
snapshotList="$(./vmrun listsnapshots "$VMName")"
# Get list of virtual machines.  VMname will hold the address of the .vmx file
VMname="$(./vmrun list)"
echo "$VMname"

# Get list of snapshots
echo "./vmrun listSnapshots '$VMname'"
snapshotList="$(./vmrun listsnapshots "$VMName")"

Just use proper quoting and string security.

You could even simplify it a little and shore up the quoting by not executing variables:

# Get list of virtual machines.  VMname will hold the address of the .vmx file
VMname="$(./vmrun list)"
echo "$VMname"

# Get list of snapshots
echo "./vmrun listSnapshots '$VMname'"
snapshotList="$(./vmrun listsnapshots "$VMName")"

Just use proper quoting and string security.

You could even simplify it a little and shore up the quoting by not executing variables:

# Get list of virtual machines.  VMname will hold the address of the .vmx file
VMname="$(./vmrun list)"
echo "$VMname"

# Get list of snapshots
echo "./vmrun listSnapshots '$VMname'"
snapshotList="$(./vmrun listsnapshots "$VMName")"
Source Link
amphetamachine
  • 5.6k
  • 2
  • 38
  • 43

Just use proper quoting and string security.

You could even simplify it a little and shore up the quoting by not executing variables:

# Get list of virtual machines.  VMname will hold the address of the .vmx file
VMname="$(./vmrun list)"
echo "$VMname"

# Get list of snapshots
echo "./vmrun listSnapshots '$VMname'"
snapshotList="$(./vmrun listsnapshots "$VMName")"