博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Commons CLI
阅读量:4043 次
发布时间:2019-05-24

本文共 2174 字,大约阅读时间需要 7 分钟。

Commons CLI

The Apache Commons CLI library provides an API for parsing command line options passed to programs. It's also able to print help messages detailing the options available for a command line tool.

Commons CLI supports different types of options:

  • POSIX like options (ie. tar -zxvf foo.tar.gz)
  • GNU like long options (ie. du --human-readable --max-depth=1)
  • Java like properties (ie. java -Djava.awt.headless=true -Djava.net.useSystemProxies=true Foo)
  • Short options with value attached (ie. gcc -O2 foo.c)
  • long options with single hyphen (ie. ant -projecthelp)

A typical help message displayed by Commons CLI looks like this:

usage: ls -A,--almost-all          do not list implied . and .. -a,--all                 do not hide entries starting with . -B,--ignore-backups      do not list implied entried ending with ~ -b,--escape              print octal escapes for nongraphic characters    --block-size 
  use SIZE-byte blocks -c                       with -lt: sort by, and show, ctime (time of last                          modification of file status information) with                          -l:show ctime and sort by name otherwise: sort                          by ctime -C                       list entries by columns     

Check out the page for a detailed presentation.

CLI 2?

Commons CLI 1.0 was formed from the merger of ideas and code from three different libraries - Werken, Avalon and Optz. In dealing with the bugs and the feature requests a freshly designed and not backwards compatible CLI 2 was created in 2004, but never finished or released.

The current plan is to continue to maintain the 1.x line. The CLI2 work may be found in the Commons Sandbox.

Documentation

A full is available as are various .

The Javadoc API documents are available online:

The can be .

Releases

The latest version is v1.2. -

The are also available.

For previous releases, see the .

Support

The act as the main support forum. The user list is suitable for most library usage queries. The dev list is intended for the development discussion. Please remember that the lists are shared between all commons components, so prefix your email subject by [cli].

转载地址:http://pemdi.baihongyu.com/

你可能感兴趣的文章
yotta企业云盘助力制造行业创高峰
查看>>
Yotta企业云盘更好的为媒体广告业服务
查看>>
Yotta企业云盘助力旅游行业新发展
查看>>
Yotta企业云盘助力科技行业创高峰
查看>>
Yotta企业云盘更好地为教育行业服务
查看>>
Yotta企业云盘怎么帮助到能源化工行业
查看>>
企业云盘如何助力商业新发展
查看>>
医疗行业运用企业云盘可以带来什么样的提升
查看>>
教育数字智能化能为现有体系带来新的起点
查看>>
媒体广告业如何将内容资产进行高效地综合管理与利用
查看>>
能源化工要怎么管控核心数据
查看>>
媒体广告业如何运用云盘提升效率
查看>>
企业如何运用企业云盘进行数字化转型-实现新发展
查看>>
司法如何运用电子智能化加快现代化建设
查看>>
设计行业运用企业云盘能带来什么样的变化
查看>>
企业云盘如何让能源电力行业乘上数字化发展列车
查看>>
iSecret 1.1 正在审核中
查看>>
IOS开发的开源库
查看>>
IOS开发的开源库
查看>>
iSecret 1.1 正式发布 Congratulat…
查看>>