【发布时间】:2011-09-07 10:54:50
【问题描述】:
我想测试一个增强(例如 -h)是否已传递到我的 bash 脚本中。
在 Ruby 脚本中:
#!/usr/bin/env ruby
puts "Has -h" if ARGV.include? "-h"
如何在 Bash 中做到最好?
【问题讨论】:
-
@Thomas -- 检查是否存在任何论点 -- 我认为这个问题询问是否存在特定论点
标签: bash testing command-line-arguments