Problems searching for a string in JAR files - shell
This is a discussion on Problems searching for a string in JAR files - shell ; Hi, I'm trying to find a string in some JAR files. I'm using Solaris 9. However, both zipgrep and grepjar are giving me problems and I'm wondering what I'm doing wrong. Here's what happens with zipgrep ... >zipgrep 'HtmlCommandButtonTag' ~/build_dir/NPS_History/GUI/WebContent/WEB-INF/lib/*.jar ...
![]() |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| |||
| |||
| I'm trying to find a string in some JAR files. I'm using Solaris 9. However, both zipgrep and grepjar are giving me problems and I'm wondering what I'm doing wrong. Here's what happens with zipgrep ... >zipgrep 'HtmlCommandButtonTag' ~/build_dir/NPS_History/GUI/WebContent/WEB-INF/lib/*.jar caution: filename not matched: /export/third-party/etsbea/home/etsbea/ build_dir/NPS_History/GUI/WebContent/WEB-INF/lib/appUtil.jar /export/ third-party/etsbea/home/etsbea/build_dir/NPS_History/GUI/WebContent/ WEB-INF/lib/appproperties.jar /export/third-party/etsbea/home/etsbea/ build_dir/NPS_History/GUI/WebContent/WEB-INF/lib/commons- beanutils-1.7.0.jar /export/third-party/etsbea/home/etsbea/build_dir/ NPS_History/GUI/WebContent/WEB-INF/lib/commons-codec-1.3.jar /export/ third-party/etsbea/home/etsbea/build_dir/NPS_History/GUI/WebContent/ WEB-INF/lib/commons-collections-3.2.jar /export/third-party/etsbea/ home/etsbea/build_dir/NPS_History/GUI/WebContent/WEB-INF/lib/commons- digester-1.8.jar /export/third-party/etsbea/home/etsbea/build_dir/ NPS_History/GUI/WebContent/WEB-INF/lib/commons-discovery-0.4.jar / export/third-party/etsbea/home/etsbea/build_dir/NPS_History/GUI/ WebContent/WEB-INF/lib/commons-el-1.0.jar /export/third-party/etsbea/ home/etsbea/build_dir/NPS_History/GUI/WebContent/WEB-INF/lib/commons- fileupload-1.0.jar /export/third-party/etsbea/home/etsbea/build_dir/ NPS_History/GUI/WebContent/WEB-INF/lib/commons-fileupload-1.2.1.jar / export/third-party/etsbea/home/etsbea/build_dir/NPS_History/GUI/ WebContent/WEB-INF/lib/commons-io-1.3.2.jar /export/third-party/etsbea/ home/etsbea/build_dir/NPS_History/GUI/WebContent/WEB-INF/lib/commons- lang-2.4.jar /export/third-party/etsbea/home/etsbea/build_dir/ NPS_History/GUI/WebContent/WEB-INF/lib/commons-logging-1.1.1.jar / export/third-party/etsbea/home/etsbea/build_dir/NPS_History/GUI/ WebContent/WEB-INF/lib/commons-pool-1.3.jar /export/third-party/etsbea/ home/etsbea/build_dir/NPS_History/GUI/WebContent/WEB-INF/lib/commons- validator-1.3.1.jar /export/third-party/etsbea/home/etsbea/build_dir/ NPS_History/GUI/WebContent/WEB-INF/lib/el-api.jar /export/third-party/ etsbea/home/etsbea/build_dir/NPS_History/GUI/WebContent/WEB-INF/lib/ jdbc.jar /export/third-party/etsbea/home/etsbea/build_dir/NPS_History/ GUI/WebContent/WEB-INF/lib/jstl-1.2.jar /export/third-party/etsbea/ home/etsbea/build_dir/NPS_History/GUI/WebContent/WEB-INF/lib/ log4j-1.2.8.jar /export/third-party/etsbea/home/etsbea/build_dir/ NPS_History/GUI/WebContent/WEB-INF/lib/myfaces-api-1.2.4.jar /export/ third-party/etsbea/home/etsbea/build_dir/NPS_History/GUI/WebContent/ WEB-INF/lib/myfaces-impl-1.2.4.jar /export/third-party/etsbea/home/ etsbea/build_dir/NPS_History/GUI/WebContent/WEB-INF/lib/ npsimplugin.jar /export/third-party/etsbea/home/etsbea/build_dir/ NPS_History/GUI/WebContent/WEB-INF/lib/standard-1.1.2.jar /export/ third-party/etsbea/home/etsbea/build_dir/NPS_History/GUI/WebContent/ WEB-INF/lib/tomahawk-1.1.7.jar /export/third-party/etsbea/home/etsbea/ build_dir/NPS_History/GUI/WebContent/WEB-INF/lib/ xmlParserAPIs-2.0.2.jar and grepjar ... >grepjar 'HtmlCommandButtonTag' ~/build_dir/NPS_History/GUI/WebContent/WEB-INF/lib/*.jar Z_BUF_ERROR Any insights you have are most appreciated, - Dave |
|
#2
| |||
| |||
|
Presuming that you are using the String class then you just need to use the replace All(x,y) method which will find all sub strings of x, and replace them with y. So if your string is called my String, then put in the code: my String.replace All("'","") That's a single quotes (inside double quotes) as the first argument, and then the empty string. Hope that helps. |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
All times are GMT -4. The time now is 08:48 AM.




Linear Mode