shell - 像在 erlang 中一样在 shell 中列出模块
问题描述
我在 erlang 中有用于列出模块的模块路径的代码:
code:get_object_code(Module)
我们在 shell 中有类似的东西吗?
我知道我们可以通过以下方式列出 shell 中的模块:
module list
但它特别没有给出特定模块名称的模块路径
我尝试过:
module show module_name
output: ModuleCmd_Display.c(151):ERROR:105: Unable to locate a modulefile for 'module_name'
解决方案
如果您将名称作为返回的名称,这似乎有效module list
。例如,我有两个活动模块:
$ module list
Currently Loaded Modulefiles:
1) module-info 2) module-git
我可以询问有关的信息,例如,module-git
输出包含模块的文件名,包括目录:
$ module show module-git
-------------------------------------------------------------------
/home/magnus/modules/modulefiles/module-git:
module-whatis {get last version of the module sources from GitHub}
set-alias get-modules {git clone git://github.com/cea-hpc/modules.git && cd modules}
-------------------------------------------------------------------
推荐阅读
- vim - 从函数中间跳转到当前函数声明
- python - 需要帮助从 Python 中提取 4 个数字
- ssis - SSIS 电子邮件请求送达回执
- java - JSONObject 无法转换为 JSONArray Volley - Android
- c# - 以特定方式显示数据表中的数据
- markdown - 由 kramdown 呈现的 GitHub 风格的降价是否有最大数量的嵌套列表?
- javascript - 有没有办法通过用户输入连续移动 P5 中的对象?
- javascript - 如果按钮与 h1 在同一行,则按钮不起作用
- html - 如何使网格元素为其拥有的每个子元素都有一列?
- c# - EF Core 中的通用搜索实现