Skip to content

Instantly share code, notes, and snippets.

@drewreece
drewreece / hosts-to-vm.sh
Last active June 26, 2018 16:32
Import locally defined hosts into Windows VM hosts file
#!/bin/sh
# hosts-to-vm.sh
#
# Made for use alongside the excellent ievms -
# https://github.com/xdissent/ievms
#
# Will export the local hosts (from /etc/hosts)
# to a batch script & add that batch script to a Windows VM
# The batch script will be executed to import the hosts onto the VM
# The batch file seems convoluted, until you only want to append the new hosts.