Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.
import os, os.path;
jar = r'.\java\bin\jar';
def main() :
for root, dirs, files in os.walk( '.' ) :
for name in files :
if name.endswith( '.jar' ) :
result = os.system( jar + ' tf ' + os.path.join( root, name ) + ' | grep PropFilePasswordEncoder >grep.out' );
if os.path.getsize( 'grep.out' ) > 0 :
print( os.path.join( root, name ) );
if __name__ == '__main__' :
main();
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Join the community of 500,000 technology professionals and ask your questions.