shell -r参数

for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
if [ "${-#*i}" != "$-" ]; then
. "$i"
else
. "$i" >/dev/null
fi
fi
done

原文地址:https://www.cnblogs.com/cheyunhua/p/14592103.html