Download and extract shflags and run example hello_world.sh
# wget http://shflags.googlecode.com/files/shflags-1.0.3.tgz
# tar zxvf shflags-1.0.3.tgz
# cd shflags-1.0.3/examples/
# ./hello_world.sh --help
USAGE: ./hello_world.sh [flags] args
flags:
-n,--name: name to say hello to (default: 'world')
-h,--[no]help: show this help (default: false)
# ./hello_world.sh --name Solnone
Hello, Solnone!
沒有留言:
張貼留言