And sorry for the noise, but it came just something to my mind: 
PATH="${PATH:-"$( { /bin/sed -n "s/^[[:space:]]*ENV_$(if [ "$(/usr/bin/id -u)" 
= 0 ]; then /usr/bin/printf SU; 
fi)PATH[[:space:]][[:space:]]*\(\|PATH=\)\(.*\)$/\2/p" /etc/login.defs | 
/usr/bin/tail -n 1; } 2> /dev/null )"}"
can be improved even more to: 
PATH="${PATH:-"$( { PATH=/bin sed -n "s/^[[:space:]]*ENV_$(if [ 
"$(PATH=/usr/bin id -u)" = 0 ]; then PATH=/usr/bin printf SU; 
fi)PATH[[:space:]][[:space:]]*\(\|PATH=\)\(.*\)$/\2/p" /etc/login.defs | 
PATH=/usr/bin tail -n 1; } 2> /dev/null )"}"

The advantage is over using the full path to the programs is:
In many cases, these are implemented as built-ins, so we'd actually save
the fork and use the in-shell version.
This applies at least to busybox and bash (where printf is builtin).

Oh and yes, I use printf over echo.
I don't think printf is slower than echo, and echo is stricly speaking
deprecated by POSIX. ;)



Cheers,
Chris.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to