#!/bin/sh if [ -e ../logs ] then echo "../logs directory already exists. Move/delete it and rerun this script." exit fi for create in create-test-setup/* do create_name="$(basename "$create")" echo "$create_name" mkdir -p "../logs/$create_name/_create" for copy in copy-snapshot/* do copy_name="$(basename "$copy")" echo "../logs/$create_name/$copy_name" ./create-and-measure "$create" > "../logs/$create_name/_create/log" 2>&1 zfs list -o used -H tank/test > "../logs/$create_name/_create/used_h" zfs list -o used -p -H tank/test > "../logs/$create_name/_create/used" mkdir -p "../logs/$create_name/$copy_name" ./copy-all-and-measure "$copy" > "../logs/$create_name/$copy_name/log" 2>&1 zfs list -o used -H tank/target > "../logs/$create_name/$copy_name/used_h" zfs list -o used -p -H tank/target > "../logs/$create_name/$copy_name/used" done done