summaryrefslogtreecommitdiffstats
path: root/tests/ts/wipefs
diff options
context:
space:
mode:
authorRuediger Meier2015-12-02 15:24:27 +0100
committerRuediger Meier2015-12-03 01:54:33 +0100
commite2142701ac6f86815dc85688efcbe1a221bef22e (patch)
treec3de16d37c58e151c6ff7301df01241360a97fb0 /tests/ts/wipefs
parentline: keep stdin unbuiffered (diff)
downloadkernel-qcow2-util-linux-e2142701ac6f86815dc85688efcbe1a221bef22e.tar.gz
kernel-qcow2-util-linux-e2142701ac6f86815dc85688efcbe1a221bef22e.tar.xz
kernel-qcow2-util-linux-e2142701ac6f86815dc85688efcbe1a221bef22e.zip
tests: avoid sed -E
GNU sed's -E option for BSD compatibility is relatively new (>=4.2) and undocumented. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/ts/wipefs')
-rwxr-xr-xtests/ts/wipefs/wipefs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ts/wipefs/wipefs b/tests/ts/wipefs/wipefs
index f921625c5..d47267827 100755
--- a/tests/ts/wipefs/wipefs
+++ b/tests/ts/wipefs/wipefs
@@ -20,7 +20,7 @@ $TS_CMD_WIPEFS --all --backup ${TS_DEVICE} &>/dev/null || ts_die "wipefs failed"
#there should be just one magic string/backup file in this case
INFILE=$(ls $HOME/wipefs-$(basename ${TS_DEVICE})-*.bak)
-OFFT=$(echo $INFILE | sed -E 's/^.*-(.*).bak$/\1/')
+OFFT=$(echo $INFILE | sed 's/^.*-\(.*\).bak$/\1/')
dd if=$INFILE of=$TS_DEVICE bs=1 conv=notrunc seek=$(($OFFT)) &>/dev/null
#the bytes should be copied back, check if wipefs can recognize it