690 shaares
3 liens privés
3 liens privés
Pense-bête
SEARCHED=<file>
for f in $(find . -type f -name "*jar"); do echo "Searching in $f: "; jar tvf $f | grep $SEARCHED; done
Autre solution (moins bien)
#!/bin/bash
find . -type f -name "*jar" -exec sh -c '
export FILE
for FILE
do
jar tf $FILE | grep -H --label=$FILE $1
done' sh {} +