Skip to content

Instantly share code, notes, and snippets.

@frgaudet
Created January 14, 2015 15:25
Show Gist options
  • Save frgaudet/bf2a4c7de7baa49bff46 to your computer and use it in GitHub Desktop.
Save frgaudet/bf2a4c7de7baa49bff46 to your computer and use it in GitHub Desktop.
#!/bin/bash
TARGET="~/temp"
listvms=`VBoxManage list runningvms | awk '{ print $2 }'`
IFS=$(echo -en "\n\b")
for vm in $listvms
do
date=`date +"%Y%m%d-%N"`
VBoxManage controlvm $vm screenshotpng $TARGET/$date.png
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment