我想获取 java 版本的所有替代方案的列表,选择一个并将其设置在脚本中,但选项 --list 无法按预期工作:
alternatives --list java
alternatives version 1.7.4 - Copyright (C) 2001 Red Hat, Inc.
This may be freely redistributed under the terms of the GNU Public License.
usage: alternatives --install <link> <name> <path> <priority>
[--initscript <service>]
[--family <family>]
[--slave <link> <name> <path>]*
alternatives --remove <name> <path>
alternatives --auto <name>
alternatives --config <name>
alternatives --display <name>
alternatives --set <name> <path>
alternatives --list
common options: --verbose --test --help --usage --version --keep-missing
--altdir <directory> --admindir <directory>
Run Code Online (Sandbox Code Playgroud)
目前我用 创建自己的列表/etc/alternatives …