Scripted AI and Scripting Engines 脚本AI与脚本引擎 This chapter discusses some of the techniques you can use to apply a scripting system to the problem of game AI, and the benefits you can reap from doing this. At its most basic level, you can think of scri…
需求描述: 写shell脚本的过程中,有时会需要获取脚本的名字,比如,有的时候,脚本 中会有usage()这种函数,可能就会用到脚本的名字. 实现方法: shell脚本中,通过使用$0就可以获取到脚本的名字或者说脚本本身. 操作过程: 1.通过以下的脚本写了一个脚本的使用函数usage() #!/bin/bash #function usage means how to use this script. usage() { echo "Usage: $0 process_name1"…