scripting to null

der.hans PLUG@LuftHans.com
Wed, 19 Apr 2000 15:29:26 -0700 (MST)


moin, moin,

I'm running commands from variables in a script, but when I tr to include
redirection in the variable it doesn't work.

UPDATECMD="$APT_GET -o Dir::Etc::sourcelist=$SOURCESFILE update
>/dev/null"
UPGRADECMD="$APT_GET -o Dir::Etc::sourcelist=$SOURCESFILE -uu -q
dist-upgrade"

$UPDATECMD && $UPGRADECMD

but

UPDATECMD="$APT_GET -o Dir::Etc::sourcelist=$SOURCESFILE update"
UPGRADECMD="$APT_GET -o Dir::Etc::sourcelist=$SOURCESFILE -uu -q
dist-upgrade"

$UPDATECMD >/dev/null && $UPGRADECMD

works. I presume it's suppoed to be like that, just wanted to see if
anyone could tell me why :).

ciao,

der.hans
-- 
#  der.hans@LuftHans.com   home.pages.de/~lufthans/   www.OpNIX.com
#  If you're not learning, you're not living. - der.hans