[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: bash vars
- From: christopher j bottaro <cjb cs utexas edu>
- To: redhat-list redhat com
- Subject: Re: bash vars
- Date: Wed May 1 03:55:01 2002
On Tuesday 30 April 2002 06:00 pm, David Talkington wrote:
> But is % really what you meant? / divides; % gives remainder after
> (${UID}/100).
yeah, check it out, its a little script for lauching quake3 (urban terror
mod). i got a bunch of computers behind a linksys router, so each user has
to have a unique net_port.
SUFFIX=$(($UID % 100))
if [ "$SUFFIX" -lt 10 ] ; then
NETPORT=2790${SUFFIX}
else
NETPORT=279${SUFFIX}
fi
echo "Starting Urban Terror on netport ${NETPORT}."
if [ -n "$DISPLAY" ] ; then
/shared/games/quake3/quake3 +set fs_game q3ut2 +set net_port ${NETPORT}
else
startx -e /shared/games/quake3/quake3 +set fs_game q3ut2 +set net_port
${NETPORT}
fi
linux is so cool, i would have no idea how to do something like this in win32.
thanks for the tips (David and Gordon), the script works great now.
christopher
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]