当前位置: 技术问答>linux和unix
用shell脚本 怎么列出名称相同,版本不同的插件
来源: 互联网 发布时间:2016-12-13
本文导语: 例如,文件夹plugins下有下列插件信息: org.eclipse.core.runtime.compatibility.registry_3.2.200.v20080610 文件夹格式插件 org.eclipse.core.runtime.compatibility.registry_3.2.200.v20100731 文件夹格式插件 org.eclipse.equinox.launcher.win32.win32.x...
例如,文件夹plugins下有下列插件信息:
org.eclipse.core.runtime.compatibility.registry_3.2.200.v20080610 文件夹格式插件
org.eclipse.core.runtime.compatibility.registry_3.2.200.v20100731 文件夹格式插件
org.eclipse.equinox.launcher.win32.win32.x86_1.0.101.R34x_v20080731 文件夹格式插件
org.apache.xerces_2.8.0.v200705301630.jar
org.apache.xerces_2.8.0.v201101010101.jar
org.apache.commons.el_1.0.0.v200806031608.jar
org.apache.commons.logging_1.0.4.v20080605-1930.jar
org.apache.commons.logging_1.0.4.v20080605-1930.jar
org.apache.commons.logging_1.0.4.v20080611-1930.jar
怎么列出其中的相同插件:
org.eclipse.core.runtime.compatibility.registry_3.2.200.v20080610
org.eclipse.core.runtime.compatibility.registry_3.2.200.v20100731
org.apache.xerces_2.8.0.v200705301630.jar
org.apache.xerces_2.8.0.v201101010101.jar
org.apache.commons.logging_1.0.4.v20080605-1930.jar
org.apache.commons.logging_1.0.4.v20080611-1930.jar
org.eclipse.core.runtime.compatibility.registry_3.2.200.v20080610 文件夹格式插件
org.eclipse.core.runtime.compatibility.registry_3.2.200.v20100731 文件夹格式插件
org.eclipse.equinox.launcher.win32.win32.x86_1.0.101.R34x_v20080731 文件夹格式插件
org.apache.xerces_2.8.0.v200705301630.jar
org.apache.xerces_2.8.0.v201101010101.jar
org.apache.commons.el_1.0.0.v200806031608.jar
org.apache.commons.logging_1.0.4.v20080605-1930.jar
org.apache.commons.logging_1.0.4.v20080605-1930.jar
org.apache.commons.logging_1.0.4.v20080611-1930.jar
怎么列出其中的相同插件:
org.eclipse.core.runtime.compatibility.registry_3.2.200.v20080610
org.eclipse.core.runtime.compatibility.registry_3.2.200.v20100731
org.apache.xerces_2.8.0.v200705301630.jar
org.apache.xerces_2.8.0.v201101010101.jar
org.apache.commons.logging_1.0.4.v20080605-1930.jar
org.apache.commons.logging_1.0.4.v20080611-1930.jar
|
awk -F "_" 'BEGIN{str=""}{for(i=1;i