shell提取cache失败列表用户脚本

以下文本中,要提取zhuxuhong1984这样得用户名,以前是手工在ultraedit里面编辑,周末学习后用以下脚本一行即可实现:
 
java.io.IOException: Server returned HTTP response code: 500 for URL: [url]http://192.168.30.49:80/servlet/com.netease.urs.servlet.ClearU[/url]
serCache2?username=zhuxuhong1984&id=1104710964
        at sun.net.[url]www.protocol.http.HttpURLConnection.getInputStream[/url](HttpURLConnection.java:709)
        at DelUser.getResponseFromUrl(DelUser.java:298)
        at DelUser.clearUser(DelUser.java:209)
        at DelUser.main(DelUser.java:387)
java.io.IOException: Server returned HTTP response code: 500 for URL: [url]http://192.168.30.49:80/servlet/com.netease.urs.servlet.ClearU[/url]
serCache2?username=shijiahao1111&id=114915978
        at sun.net.[url]www.protocol.http.HttpURLConnection.getInputStream[/url](HttpURLConnection.java:709)
        at DelUser.getResponseFromUrl(DelUser.java:298)
        at DelUser.clearUser(DelUser.java:209)
        at DelUser.main(DelUser.java:387)
java.io.IOException: Server returned HTTP response code: 500 for URL: [url]http://192.168.30.49:80/servlet/com.netease.urs.servlet.ClearU[/url]
serCache2?username=chenjie8217&id=80693754
        at sun.net.[url]www.protocol.http.HttpURLConnection.getInputStream[/url](HttpURLConnection.java:709)
        at DelUser.getResponseFromUrl(DelUser.java:298)
        at DelUser.clearUser(DelUser.java:209)
        at DelUser.main(DelUser.java:387)
java.io.IOException: Server returned HTTP response code: 500 for URL: [url]http://192.168.30.49:80/servlet/com.netease.urs.servlet.ClearU[/url]
serCache2?username=27551017&id=79447638
        at sun.net.[url]www.protocol.http.HttpURLConnection.getInputStream[/url](HttpURLConnection.java:709)
        at DelUser.getResponseFromUrl(DelUser.java:298)
        at DelUser.clearUser(DelUser.java:209)
        at DelUser.main(DelUser.java:387)
 
 
cat [1-5].log|sed -e 's/java.io.IOException: Server returned HTTP response code: 500 for URL: http:\/\/192.168.30.49:80\/servlet\/co
m.netease.urs.servlet.ClearUserCache2?username=//g'|cut -f1 -s  -d'&' >1_5new.log

你可能感兴趣的:(cache,shell,脚本,职场,休闲)