批量删除Jenkins的jobs下的多余文件名称字符

[root@sanyi-pro915-ops-jumpserver jobs]# ls
jc_test_gjh_Api_Authentication             jc_test_gjh_Api_MatchApi                      jc_test_gjh_Api_ServicesIntegrationQiDian          jc_test_gjh_Api_WebMatchHttpAggregator           jc_test_gjh_Site_CmsAdmin
jc_test_gjh_Api_Bayantu-Message            jc_test_gjh_Api_MediaAPIServer                jc_test_gjh_Api_ServicesLiveMeeting                jc_test_gjh_Api_WebOpenApiHttpAggregator         jc_test_gjh_Site_EditorSite
jc_test_gjh_Api_Bayantu-Report             jc_test_gjh_Api_MicroSiteApi                  jc_test_gjh_Api_ServicesMicroSiteEventBusApi       jc_test_gjh_Api_WebPublicServicesHttpAggregator  jc_test_gjh_Site_EvosApiGateway
jc_test_gjh_Api_Bayantu.Services.OpenData  jc_test_gjh_Api_MiniClientHttpAggregator      jc_test_gjh_Api_ServicesStaticizeApi               jc_test_gjh_Api_Weixin                           jc_test_gjh_Site_EvosClientSite
jc_test_gjh_Api_Bayantu-Tencent            jc_test_gjh_Api_MobileMainHttpAggregator      jc_test_gjh_Api_Tencentocr                         jc_test_gjh_Api_wenlv                            jc_test_gjh_Site_ExhibitorCenter
jc_test_gjh_Api_Bussinesscard              jc_test_gjh_Api_MvcApi                        jc_TEST_GJH_API_TencentocrCmsAPI                   jc_test_gjh_Api_YieldManagement                  jc_test_gjh_Site_LiteEvent
jc_test_gjh_Api_Cms                        jc_test_gjh_Api_Onsite                        jc_test_gjh_Api_WebClientCmsWebSiteHttpAggregator  JC-TEST_gjh_frontend_bventmain                   jc_test_gjh_Site_LiteEventClient
jc_test_gjh_Api_Communication              jc_test_gjh_Api_OrganizeReportAPIServer       jc_test_gjh_Api_WebClientHttpAggregator            JC-TEST_gjh_frontend_cmssite                     jc_test_gjh_Site_MicroSiteMvcSite
jc_test_gjh_Api_CronJob                    jc_test_gjh_Api_Oss_Video                     jc_test_gjh_Api_WebClientLightEventHttpAggregator  JC-TEST_gjh_frontend_exhibition                  jc_test_gjh_Site_OpenApi
jc_test_gjh_Api_DataStatisticsAPIServer    jc_test_gjh_Api_Party                         jc_test_gjh_Api_WebClientMicroSiteHttpAggregator   JC-TEST_gjh_frontend_gjbuyer                     jc_test_gjh_Site_PCSite
jc_test_gjh_Api_ESAPIServer                jc_test_gjh_Api_PermissionAndMenu             jc_test_gjh_Api_WebCmsAdminHttpAggregator          JC-TEST_gjh_frontend_gjexhibitor                 jc_test_gjh_Site_ScheduleSite
jc_test_gjh_Api_EventFlowDefinition        jc_test_gjh_Api_Posters                       jc_test_gjh_Api_WebCmsSiteHttpAggregator           JC-TEST_gjh_frontend_gjtradinggroup              jc_test_gjh_Site_ViewerSite
jc_test_gjh_Api_Exhibition                 jc_test_gjh_Api_PurchaserManagementAPIServer  jc_test_gjh_Api_WebExhibitionCientHttpAggregator   JC-TEST_gjh_frontend_gjvipgroup                  jc_test_gjh_Site_WebAppsAdmin
jc_test_gjh_Api_Hotel                      jc_test_gjh_Api_Registration                  jc_test_gjh_Api_WebExhibitionHttpAggregator        JC-TEST_gjh_frontend_msite                       jc_test_gjh_Site_WebAppsFile
jc_test_gjh_Api_InvitationAndDistribution  jc_test_gjh_Api_ResourceManagement            jc_test_gjh_Api_WebLightEventHttpAggregator        JC-TEST_gjh_frontend_pcsite
jc_test_gjh_Api_ItemManagement             jc_test_gjh_Api_Sensorsdata                   jc_test_gjh_Api_WebMainHttpAggregator              jc_test_gjh_Site_Bayantu.App.OpenGateway
[root@sanyi-pro915-ops-jumpserver jobs]# 
[root@sanyi-pro915-ops-jumpserver jobs]# 
[root@sanyi-pro915-ops-jumpserver jobs]# for i in `find ./ -name "jc_test_*"`;do mv $i `echo $i | awk -F"jc_test_" '{print $NF}'`;done
[root@sanyi-pro915-ops-jumpserver jobs]# ls
gjh_Api_Authentication             gjh_Api_MatchApi                      gjh_Api_ServicesIntegrationQiDian          gjh_Api_WebOpenApiHttpAggregator         gjh_Site_ScheduleSite
gjh_Api_Bayantu-Message            gjh_Api_MediaAPIServer                gjh_Api_ServicesLiveMeeting                gjh_Api_WebPublicServicesHttpAggregator  gjh_Site_ViewerSite
gjh_Api_Bayantu-Report             gjh_Api_MicroSiteApi                  gjh_Api_ServicesMicroSiteEventBusApi       gjh_Api_Weixin                           gjh_Site_WebAppsAdmin
gjh_Api_Bayantu.Services.OpenData  gjh_Api_MiniClientHttpAggregator      gjh_Api_ServicesStaticizeApi               gjh_Api_wenlv                            gjh_Site_WebAppsFile
gjh_Api_Bayantu-Tencent            gjh_Api_MobileMainHttpAggregator      gjh_Api_Tencentocr                         gjh_Api_YieldManagement                  jc_TEST_GJH_API_TencentocrCmsAPI
gjh_Api_Bussinesscard              gjh_Api_MvcApi                        gjh_Api_WebClientCmsWebSiteHttpAggregator  gjh_Site_Bayantu.App.OpenGateway         JC-TEST_gjh_frontend_bventmain
gjh_Api_Cms                        gjh_Api_Onsite                        gjh_Api_WebClientHttpAggregator            gjh_Site_CmsAdmin                        JC-TEST_gjh_frontend_cmssite
gjh_Api_Communication              gjh_Api_OrganizeReportAPIServer       gjh_Api_WebClientLightEventHttpAggregator  gjh_Site_EditorSite                      JC-TEST_gjh_frontend_exhibition
gjh_Api_CronJob                    gjh_Api_Oss_Video                     gjh_Api_WebClientMicroSiteHttpAggregator   gjh_Site_EvosApiGateway                  JC-TEST_gjh_frontend_gjbuyer
gjh_Api_DataStatisticsAPIServer    gjh_Api_Party                         gjh_Api_WebCmsAdminHttpAggregator          gjh_Site_EvosClientSite                  JC-TEST_gjh_frontend_gjexhibitor
gjh_Api_ESAPIServer                gjh_Api_PermissionAndMenu             gjh_Api_WebCmsSiteHttpAggregator           gjh_Site_ExhibitorCenter                 JC-TEST_gjh_frontend_gjtradinggroup
gjh_Api_EventFlowDefinition        gjh_Api_Posters                       gjh_Api_WebExhibitionCientHttpAggregator   gjh_Site_LiteEvent                       JC-TEST_gjh_frontend_gjvipgroup
gjh_Api_Exhibition                 gjh_Api_PurchaserManagementAPIServer  gjh_Api_WebExhibitionHttpAggregator        gjh_Site_LiteEventClient                 JC-TEST_gjh_frontend_msite
gjh_Api_Hotel                      gjh_Api_Registration                  gjh_Api_WebLightEventHttpAggregator        gjh_Site_MicroSiteMvcSite                JC-TEST_gjh_frontend_pcsite
gjh_Api_InvitationAndDistribution  gjh_Api_ResourceManagement            gjh_Api_WebMainHttpAggregator              gjh_Site_OpenApi
gjh_Api_ItemManagement             gjh_Api_Sensorsdata                   gjh_Api_WebMatchHttpAggregator             gjh_Site_PCSite

 

你可能感兴趣的:(shell)