Removes all package declarations and imports from all .*java files in the current directory and copies them to a temp folder
Just replace package with your root package name.
#!/bin/bash | |
package="pgdp" | |
mkdir temp | |
#Copy all files to temp | |
find . -iname '*.java' -exec cp -rf --target-directory temp/ {} \; | |
cd temp | |
#Replace all package related lines | |
find . -type f -print0 | xargs -0 sed -i "/${package}/d" |
Removes all package declarations and imports from all .*java files in the current directory and copies them to a temp folder
Just replace package with your root package name.