dbaspot
Tags Register FAQ Calendar Search Today's Posts Mark Forums Read

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 ...


Home > Database Forum > Operating Systems > shell > Problems searching for a string in JAR files

Reply

 

LinkBack Thread Tools Display Modes
  #1  
Old 11-13-2008, 12:03 PM
Database Bot
 
Join Date: Sep 2009
Posts: 1,236,254
Database Administrator is on a distinguished road
Default Problems searching for a string in JAR files

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

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
Reply With Quote
  #2  
Old 02-23-2010, 02:29 AM
Database Expert
 
Join Date: Feb 2010
Posts: 42
HENARRY JAYA is on a distinguished road
Default Re: searching Problems

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.
Reply With Quote
Reply

Thread Tools
Display Modes



All times are GMT -4. The time now is 08:48 AM.