Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sql-server-2005/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bash Shell命令列出Apache2.x中HTTP模块的版本_Bash_Shell_Command Line_Command_Command Line Arguments - Fatal编程技术网

Bash Shell命令列出Apache2.x中HTTP模块的版本

Bash Shell命令列出Apache2.x中HTTP模块的版本,bash,shell,command-line,command,command-line-arguments,Bash,Shell,Command Line,Command,Command Line Arguments,至少在CentOS 6.x中,我还没有找到列出可用Apache2.x模块版本的方法。我相信可以发布以下(伪代码): 节([…])删除每个$ln的前25个字符和最后3个字符,然后将其导入rpm。这可以通过sed、awk或bash实现。只有十几条生产线需要处理,因此我不是在寻找最有效的方法来完成这项工作,而是寻找一些可行的方法。 样本输入: /usr/lib64/httpd/modules/mod_authz_default.so /usr/lib64/httpd/modules/mod_fcgid

至少在CentOS 6.x中,我还没有找到列出可用Apache2.x模块版本的方法。我相信可以发布以下(伪代码):

节([…])删除每个$ln的前25个字符和最后3个字符,然后将其导入
rpm
。这可以通过sed、awk或bash实现。只有十几条生产线需要处理,因此我不是在寻找最有效的方法来完成这项工作,而是寻找一些可行的方法。

样本输入:

/usr/lib64/httpd/modules/mod_authz_default.so
/usr/lib64/httpd/modules/mod_fcgid.so
/usr/lib64/httpd/modules/mod_log_config.so

我认为您正在寻找以下内容:

find /usr/lib64/httpd/modules/ -type f | xargs -n1 rpm -qf | sort -u

尝试移动
;在您呼叫
rpm
后,完成对的操作。请注意,在当前代码中,只有分配给
$ln
的最后一个值才会显示给
rpm
。祝你好运
find /usr/lib64/httpd/modules/ -type f | xargs -n1 rpm -qf | sort -u