On Thu, Jan 28, 2021 at 04:21:01PM +0800, Luan Shengde wrote:
add output usage add option -h|--help set default option to -h|--help if no options added
Signed-off-by: Luan Shengde shdluan@163.com
sbin/build-my-info.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/sbin/build-my-info.rb b/sbin/build-my-info.rb index fd75f51..028fbac 100755 --- a/sbin/build-my-info.rb +++ b/sbin/build-my-info.rb @@ -14,6 +14,11 @@ option = { }
options = OptionParser.new do |opts|
- opts.banner = "Usage: ./build-my-info.rb -e email -n name -l lab\n"
./build-my-info.rb => build-my-info and we can add #!/usr/bin/env ruby at 1st line of the file the file name can: build-my-info.rb => build-my-info
Thanks, Weitao