Skip to content

Instantly share code, notes, and snippets.

@jamieparfet
jamieparfet / extract-jars.sh
Created June 18, 2018 17:03
Extract all jar files within subdirectories into respective folders
#!/bin/bash
BASE_PATH=/root/source-code/project/subdir
REMOVE_FROM_PATH=/root/source-code/project/
OUTPUT_DIR=/root/testing/temp
for JAR_FILE in $(find "$BASE_PATH" -name "*.jar" -type f); do
# Show found .jar file
echo "File: $JAR_FILE"
# Perform unzip operation