Advertisement
pfff

Untitled

May 31st, 2018
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # !!! Be careful with scripts, always do your backup or play on a copy !!!
  4.  
  5. if [[ $# -eq 0 ]] ; then
  6. echo 'usage: prfiles.sh project.dproj'
  7. exit 1
  8. fi
  9.  
  10. declare file_content=$( cat $1 | sed -nr "/DCCReference Include/I{s/(.*)\"(.*)\"(.*)/\2/g;p}" )
  11.  
  12. shopt -s nocasematch
  13.  
  14. for i in `find . -name "*.pas" -type f -printf '%f\n'`; do
  15. [[ ! " $file_content " =~ $i ]] && echo $i "not in dproj"
  16. done
  17.  
  18. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement