seeleaks 961 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. #ex=("--exclude-dir=blahblablah")
  3. ex=()
  4. #grepstr='(userone|usertwo|1nonpkgs|1packages|2nonpkgs|2packages)'
  5. grepstr='(\<[a-zA-Z0-9_-]*C[a-zA-Z0-9_-]*E[a-zA-Z0-9_-]*N[a-zA-Z0-9_-]*S[a-zA-Z0-9_-]*O[a-zA-Z0-9_-]*R[a-zA-Z0-9_-]*E[a-zA-Z0-9_-]*D[a-zA-Z0-9_-]*\>)'
  6. #not censored: |1nonpkgs|1packages|2nonpkgs|2packages
  7. zlist="$(find . -print0| xargs -0 -P1 -- stat --| grep '^ File:' |grep --color=always -iE -- "$grepstr" | sort -u|sed '/^$/d')"
  8. echo "$zlist" # | sed 's/^$//g' #should be only one: the last line
  9. #zlist="${zlist//^$/}"
  10. a1=$(wc -l <<<"$zlist") #XXX this variant still adds empty line if no elements!
  11. #a1=$(( a1 - 1 ))
  12. echo "!! In $a1 file/symlink/path names.(+- 1)"
  13. if test "$1" == "onlynames"; then
  14. echo 'done'
  15. exit 0
  16. fi
  17. zlist="$(grep "${ex[@]}" -lrIEi "$grepstr" | sort -u |sed '/^$/d')"
  18. echo "$zlist" #| sed '/^$/d' #should be only one: the last line
  19. a1=$(wc -l <<<"$zlist")
  20. #a1=$(( a1 - 1 ))
  21. echo "!! In $a1 file contents."