有关Bash脚本的帮助 [英] Help on Bash Scripting

查看:68
本文介绍了有关Bash脚本的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


i认为我已经到了最后,我不得不为我做了一个巨大的学习曲线,但我还有几个问题,我希望你能帮助我。我认为这是一个非常简单的事情,我看起来只需要一双新鲜的眼睛来看待。如果你能看一下剧本并让我知道你的想法,我会非常感激。如果您有任何解决方案,或建议只是给我发电子邮件或下午...


播放器1选项脚本:


Hello there guys,

i think i am at the end of this, which i have to edmit has been a huge learning curve for me, but i still have couple of problems, which i was hoping you can help me. I think tbh its a very simple thing which i am over looking and just require a pair of fresh eyes to look at. I greatly appriciate if you could have a look at the script and let me know what you think. if you have any solution, or advise just email me or pm here..

player 1 option scripts:


展开 | 选择 | < span class =codeLinkonclick =WordWrap(this);> Wrap | 行号

推荐答案


所以为了闷闷不乐而又无聊是:

1-循环播放,以便玩家可以继续玩,如果他们决定再玩一次。
so to sumerise and stop boring a hell out of you, the problems are:
1- the looping so the players can continue if they decide to play again.



问题是没有循环。你只需要重播,

如果'y'然后你打电话给启动,但所有''启动''确实打印你看到的

行: - )


尝试在你的游戏中循环,当

答案不是y时退出。这应该有帮助。


HTH,

arne

The problem is that there is no loop. You just ask for a replay,
if ''y'' then you call startup, but all ''startup'' does is to print the
line you see :-)

Try to put a loop around your game which exits when the
answer is not ''y''. This should help.

HTH,
arne



问题是没有循环。你只需要重播,

如果'y'然后你打电话给启动,但所有''启动''确实打印你看到的

行: - )


尝试在你的游戏中循环,当

答案不是y时退出。这应该会有所帮助。


HTH,

arne
The problem is that there is no loop. You just ask for a replay,
if ''y'' then you call startup, but all ''startup'' does is to print the
line you see :-)

Try to put a loop around your game which exits when the
answer is not ''y''. This should help.

HTH,
arne



tbh我不确定我理解你是什​​么意思..我认为启动是一个功能,当它提到并且应该运行时它会被调用...如果在答案不是''y'时存在循环,那肯定会只是结束游戏??


我真的很厚吗?


K

tbh i am not sure i understand what you mean.. i thought as startup is a function, it will get called up when its mentioned and should run... and if there is a loop which exist when the answer is not ''y'', surely that will just end the game??

am i being really thick here?

K



tbh我不确定我明白你的意思..我认为启动是一个功能,当它提到并且应该运行时它会被调用...并且如果有一个循环当答案不是'y'时存在,肯定会结束游戏?


我真的很厚吗?


K
tbh i am not sure i understand what you mean.. i thought as startup is a function, it will get called up when its mentioned and should run... and if there is a loop which exist when the answer is not ''y'', surely that will just end the game??

am i being really thick here?

K



对不起,如果我不清楚的话。


如果你在第101行打电话重播,它将调用启动,它将打印并返回。该程序将在之后退出(这可能不是您想要的)。根据启动的返回代码,您应该跳回第43行以重复游戏。这通常通过循环完成。


arne

Sorry, if I wasn''t clear.

If you call replay in line 101, it will call startup, which will print and return. The program will exit afterwards (which is probably not what you want). Depending on the return code of startup, you should jump back to line 43 in order to repeat the game. This is usually done by a loop.

arne


这篇关于有关Bash脚本的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆