jgoodsen (owner)

Revisions

gist: 73869 Download_button fork
public
Public Clone URL: git://gist.github.com/73869.git
Embed All Files: show embed
jargrep.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
##
## Grep through several jar files and tell me which jar matches the term.
##
## Usage: jargrep <expression> <jar file list>
##
 
search_term=ARGV.shift
ARGV.each do |jarfile|
command = "jar tvf #{jarfile} | grep #{search_term}"
puts "\n#{command}"
system command
end