Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #This script replaces TestNew with filename-.java making the compiler a happy person.
- #Get a list of files in the directory
- files=`ls -l | awk '{print $8}'`
- #Load a file
- for file in ${files[*]};do
- #Stop the script from changing...the script
- if [ $file -ne "javaClassNameFix.sh" ]
- then
- #Replace TestNew with filename - .java
- sed -i 's/TestNew/'${file%%.java}'/g' $file
- fi
- done
- echo $files
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement