#!/bin/sh OLD_IFS=$IFS IFS=$'\n' for dataset in `zfs list -H | cut -f 1` do zfs get all $dataset > ~/Desktop/ZFS\ file\ system\ properties.txt done IFS=$OLD_IFS