> Midnight Commander (I have version 4.1.8, RedHat 5.0) is launched using
> the following shell macro:
>
> mc=()
> {
> MC=/tmp/mc$$-"$RANDOM";
> /usr/bin/mc -P "$@" >"$MC";
> cd "`cat $MC`";
> rm "$MC";
> unset MC
> }
>
> Solution? Use mktemp: MC=`mktemp mc$$-XXXXXX` instead of $RANDOM :)))
Solution? Don't use any temporary file at all.
mc()
{
MC=`/usr/bin/mc -P "$@"`
[ -n "$MC" ] && cd $MC
unset MC
}
The function is from mcfn_install script. The alias in lib/mc.csh is
similar. But lib/mc.sh is the aformentioned lame one. It's absurd.
--Pavel Kankovsky aka Peak [ Boycott Microsoft -- http://www.vcnet.com/bms ]