diff --git a/chapter05/glibc.xml b/chapter05/glibc.xml
index e2b5b2d17..6f9d6f171 100644
--- a/chapter05/glibc.xml
+++ b/chapter05/glibc.xml
@@ -46,7 +46,7 @@
Create a compatibility symbolic link required for proper
operation of the dynamic library loader:
-if $LFS_TGT-gcc -v 2>&1 | grep nan=2008 &>/dev/null; then
+if $LFS_TGT-gcc -v |& grep -q nan=2008; then
ln -sfv ../lib/ld-linux-mipsn8.so.1 $LFS/lib64
else
ln -sfv ../lib/ld.so.1 $LFS/lib64