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>
This commit is contained in:
Ruediger Meier 2015-12-02 15:24:27 +01:00
parent e03f29b694
commit e2142701ac
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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