m********e 发帖数: 23 | 1 遇到一个写脚本的问题,下面注释是我的问题,哪位大侠指点一下?谢谢!
TESTS="a b"
RUNa='date'
RUNb='who'
for i in $TESTS
do
run="RUN$i"
#here I want to run the command stored in $run, how to do it?
#cannot use ${$run}
done |
|
c***g 发帖数: 30 | 2 This should work.
TESTS="a b"
RUNa='date'
RUNb='who'
for i in $TESTS
do
run="RUN$i"
eval comm=\$"$run"
$comm
done |
|
w*******y 发帖数: 60932 | 3
Link:
http://store.steampowered.com/sale/trickortreat
ghostbuster: the video games $10
Left 4 Dead 2 $10
Worms Reloaded $10
Plants v Zombies $5
Amnesia $13
BioShock $5
Zombie Driver $5
Dracula Origin $5
Alter Ego $15
Dark Fall: Lost Souls $7
Burn Zombie Runb $5
Left 4 Dead $10
Haunted House $10
Resident Evil 5 $15
Devil May Cry 4 $10
Silent Hill Homecoming $20
Team Fortress 2 $10
Ghost Master $2.50
Aliens v Predator $10
Doom Rails $5
Dead Space $10
Overlord Complete $7.50
Zombie Bowl-o-Rama $... 阅读全帖 |
|