]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: avoid sed -E
authorRuediger Meier <ruediger.meier@ga-group.nl>
Wed, 2 Dec 2015 14:24:27 +0000 (15:24 +0100)
committerRuediger Meier <ruediger.meier@ga-group.nl>
Thu, 3 Dec 2015 00:54:33 +0000 (01:54 +0100)
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>
tests/ts/uuid/uuidd
tests/ts/wipefs/wipefs

index 147f289a46f78c07d31f63c9e9b1f0def27d3ee8..17cf29d0641a632d658be4ae5b1d4025bd474aca 100755 (executable)
@@ -33,7 +33,7 @@ fi
 test_flag() {
        echo "options: $*" >> $TS_OUTPUT
        $TS_CMD_UUIDD -s $UUIDD_SOCKET $* |
-               sed -E '/List of UUIDs:/d; s/^[[:space:]]+//' > "$OUTPUT_FILE" 2>>$TS_OUTPUT
+               sed '/List of UUIDs:/d; s/^[[:space:]]*//' > "$OUTPUT_FILE" 2>>$TS_OUTPUT
        $TS_HELPER_UUID_PARSER "$OUTPUT_FILE" >> $TS_OUTPUT 2>&1
        ret=$?
        if [ $ret -ne 0 ]; then
index f921625c53648973a12d3aa3c9eef2766469af97..d4726782721e704d20c40db06ba1840234cc0906 100755 (executable)
@@ -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