#!/bin/bash >sessionbuddymd5.txt for f in session*; do md5sum "$f" >> sessionbuddymd5.txt done cat sessionbuddymd5.txt while read linein; do part1=$(echo $linein |awk '{print $1}') part2=$(echo $linein |awk '{print $2}') echo $part1 xattr -w com.myzfs.md5sum "$part1" "$part2" done