snapraid-btrfs icon indicating copy to clipboard operation
snapraid-btrfs copied to clipboard

Add sed script to trim whitespace around drive

Open sytone opened this issue 3 years ago • 0 comments

Hit an issue where when parsing the snapper output there was whitespace after the drive meaning it was never matched against. This can be seen using the following command. Adding the additional script to trim the drive resolves the issue and the configurations are now found.

$:~$ snapper -c mergerfsdisk4 get-config | sed -e '/^SUBVOLUME /!d' -e 's/^SUBVOLUME[ ]*| //' -e 's/\s+//g' | tr " " "*" | tr "\t" "&"
/mnt/disk4**********

sytone avatar Jan 08 '22 05:01 sytone