Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #!/bin/bash
  2. #This script replaces TestNew with filename-.java making the compiler a happy person.
  3. #Get a list of files in the directory
  4. files=`ls -l | awk '{print $8}'`
  5. #Load a file
  6. for file in ${files[*]};do
  7. #Stop the script from changing...the script
  8. if [ $file -ne "javaClassNameFix.sh" ]
  9. then
  10.  
  11. #Replace TestNew with filename - .java
  12. sed -i 's/TestNew/'${file%%.java}'/g' $file
  13. fi
  14. done
  15. echo $files
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement