gudii9
asked on
looking for unix program to search some keywords in side EAR WAR and JAR files
Hi,
I am looking for unix program to search some keywords(say "hello", "world" etc) in side EAR file (say xyz.EAR) which has a WAR file(say abc.war) and has JAR files(like def.jar, ghi.jar).
I have installed cygwin and MobaXTerm already. Please advise
I am looking for unix program to search some keywords(say "hello", "world" etc) in side EAR file (say xyz.EAR) which has a WAR file(say abc.war) and has JAR files(like def.jar, ghi.jar).
I have installed cygwin and MobaXTerm already. Please advise
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If the file in the jars are compressed (in which way ever) the only way
would be to unpack the archives (hierarchally where needed) and
scan the resulting diretory tree afterwards
To give you some idea: Scan all files in current directory tree, try something like
would be to unpack the archives (hierarchally where needed) and
scan the resulting diretory tree afterwards
To give you some idea: Scan all files in current directory tree, try something like
cd <top-level-directory>
strings `find * -type f` | grep -i hello
ASKER
how to search multiple words about 100 same time and generate some text report? any sample shell script to this. if i search hello it should not find helloall as well. Needs to be correct match
Use grep in the right way no NOT match helloxyz, only hello as a single word
Something like:
To put all this into a file:
Something like:
grep -i '[ ^]hello[$ ]'
Read how to use (and compose) regular expresiions for grep to accomplish this.To put all this into a file:
strings `find * -type f` | grep -i hello > report.txt 2>&1
Using Perl regex (depending on what version of grep you have) is easier
grep -iP '\bhello\b'
... as you say "depending on grep version".
Your man page(s) for grep should shed light on this.
Your man page(s) for grep should shed light on this.
Sorry - how does the 'Accepted Solution' answer the question in any way?
ASKER