seeleaks 809 B

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