Fix: egrep is obsolescent, use grep -E
See e.g., egrep(1) [https://linux.die.net/man/1/egrep]: > two variant programs egrep and fgrep are available. egrep is the same > as grep -E. fgrep is the same as grep -F. Direct invocation as either > egrep or fgrep is deprecated See also the rationale of the POSIX description of grep (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html): > This grep has been enhanced in an upwards-compatible way to provide > the exact functionality of the historical egrep and fgrep commands as > well. It was the clear intention of the standard developers to > consolidate the three greps into a single command. Closes: #839
This commit is contained in:
@@ -19,7 +19,7 @@ MME_CONF[@HSS_IP_ADDR@]="192.168.61.2"
|
||||
cp mme_fd.conf.tmplt $PREFIX/mme_fd.conf
|
||||
|
||||
for K in "${!MME_CONF[@]}"; do
|
||||
egrep -lRZ "$K" $PREFIX/mme_fd.conf | xargs -0 -l sed -i -e "s|$K|${MME_CONF[$K]}|g"
|
||||
grep -E -lRZ "$K" $PREFIX/mme_fd.conf | xargs -0 -l sed -i -e "s|$K|${MME_CONF[$K]}|g"
|
||||
ret=$?;[[ ret -ne 0 ]] && echo "Could not replace $K with ${MME_CONF[$K]}"
|
||||
done
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ then
|
||||
ifconfig ${MME_INTERFACE_NAME_FOR_S10} ${MME_IPV4_ADDRESS_FOR_S10} up
|
||||
fi
|
||||
|
||||
LIST_OF_NETWORKS=`ifconfig -s | egrep -v "^Iface|^lo" | cut -d' ' -f1`
|
||||
LIST_OF_NETWORKS=`ifconfig -s | grep -E -v "^Iface|^lo" | cut -d' ' -f1`
|
||||
|
||||
for if_name in $LIST_OF_NETWORKS
|
||||
do
|
||||
|
||||
@@ -19,7 +19,7 @@ MME_CONF[@HSS_IP_ADDR@]="192.168.61.194"
|
||||
cp mme_fd.conf.tmplt $PREFIX/mme_fd.conf
|
||||
|
||||
for K in "${!MME_CONF[@]}"; do
|
||||
egrep -lRZ "$K" $PREFIX/mme_fd.conf | xargs -0 -l sed -i -e "s|$K|${MME_CONF[$K]}|g"
|
||||
grep -E -lRZ "$K" $PREFIX/mme_fd.conf | xargs -0 -l sed -i -e "s|$K|${MME_CONF[$K]}|g"
|
||||
ret=$?;[[ ret -ne 0 ]] && echo "Tried to replace $K with ${MME_CONF[$K]}"
|
||||
done
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ MME_CONF[@HSS_IP_ADDR@]="192.168.61.194"
|
||||
cp mme_fd.conf.tmplt $PREFIX/mme_fd.conf
|
||||
|
||||
for K in "${!MME_CONF[@]}"; do
|
||||
egrep -lRZ "$K" $PREFIX/mme_fd.conf | xargs -0 -l sed -i -e "s|$K|${MME_CONF[$K]}|g"
|
||||
grep -E -lRZ "$K" $PREFIX/mme_fd.conf | xargs -0 -l sed -i -e "s|$K|${MME_CONF[$K]}|g"
|
||||
ret=$?;[[ ret -ne 0 ]] && echo "Tried to replace $K with ${MME_CONF[$K]}"
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user