egrep -> grep -E

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259
This commit is contained in:
наб
2022-03-12 00:25:47 +01:00
committed by Brian Behlendorf
parent 270d0a5a16
commit f63c9dc70a
18 changed files with 48 additions and 75 deletions
@@ -37,7 +37,7 @@
#
# STRATEGY:
# 1. 'zfs list -d <n>' to get the output.
# 2. 'zfs list -r|egrep' to get the expected output.
# 2. 'zfs list -r|grep' to get the expected output.
# 3. Compare the two outputs, they should be same.
#
@@ -50,8 +50,7 @@ fi
function cleanup
{
log_must rm -f $DEPTH_OUTPUT
log_must rm -f $EXPECT_OUTPUT
log_must rm -f $DEPTH_OUTPUT $EXPECT_OUTPUT
}
log_onexit cleanup
@@ -76,10 +75,10 @@ for dp in ${depth_array[@]}; do
log_must eval "zfs list -H -d $dp -o name -t ${fs_type[$fs]} $DEPTH_FS > $DEPTH_OUTPUT"
[[ -s "$DEPTH_OUTPUT" ]] && \
log_fail "$DEPTH_OUTPUT should be null."
log_mustnot zfs list -rH -o name -t ${fs_type[$fs]} $DEPTH_FS | egrep -e '$eg_opt'
log_mustnot zfs list -rH -o name -t ${fs_type[$fs]} $DEPTH_FS | grep -E "$eg_opt"
else
log_must eval "zfs list -H -d $dp -o name -t ${fs_type[$fs]} $DEPTH_FS > $DEPTH_OUTPUT"
log_must eval "zfs list -rH -o name -t ${fs_type[$fs]} $DEPTH_FS | egrep -e '$eg_opt' > $EXPECT_OUTPUT"
log_must eval "zfs list -rH -o name -t ${fs_type[$fs]} $DEPTH_FS | grep -E '$eg_opt' > $EXPECT_OUTPUT"
log_must diff $DEPTH_OUTPUT $EXPECT_OUTPUT
fi
(( fs+=1 ))