stan wrote:
On Wed, 17 Nov 2010 14:56:04 -0500 Bill Davidsendavidsen@tmr.com wrote:
stan wrote:
#Fix console loglevel if [ -n "$LOGLEVEL" ]; then /bin/dmesg -n $LOGLEVEL else /bin/dmesg -n 3 fi
/bin/dmesg -n ${LOGLEVEL:-3}
That's slick. I presume you meant /bin/dmesg -n ${LOGLEVEL:3} changing the -3 to a 3? I didn't look up the documentation, just extrapolating.
What I wrote means to use the $LOGLEVEL value if defined, else to use the default value "3". See the bash manual for operators, there are a bunch, of which ":-" is the one I use most often.