did-I-read-this 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/bash
  2. # Copyright © 2021-2023 Jeffrey Cliff
  3. #
  4. # This program is free software: you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation, either version 3 of the License, or (at
  7. # your option) any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful, but
  10. # WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. # General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <https://www.gnu.org/licenses/>.
  16. MEMEDIR=/mnt/disk/meme
  17. STERM='"'"${@:1}"'"'
  18. TMPFILE=`mktemp`
  19. echo grep -i $STERM $MEMEDIR/1990s -r >> $TMPFILE
  20. echo grep -i $STERM $MEMEDIR/*/*/*/{booksread,booksread.txt,books-read-*,alreadyread.txt} >> $TMPFILE
  21. echo grep -i $STERM /home/themusicgod1/alreadyread.txt >> $TMPFILE
  22. #echo grep -i $STERM $MEMEDIR/20/0/3/booksread.txt >> $TMPFILE
  23. #echo grep -i $STERM $MEMEDIR/20/0/5/booksread >> $TMPFILE
  24. #echo grep -i $STERM $MEMEDIR/20/0/6/books-read-2006 >> $TMPFILE
  25. #echo grep -i $STERM $MEMEDIR/20/0/7/books-read-2007 >> $TMPFILE
  26. #echo grep -i $STERM $MEMEDIR/20/0/8/booksread >> $TMPFILE
  27. #echo grep -i $STERM $MEMEDIR/20/0/9/booksread >> $TMPFILE
  28. #echo grep -i $STERM $MEMEDIR/20/1/0/booksread >> $TMPFILE
  29. #echo grep -i $STERM $MEMEDIR/20/1/1/booksread >> $TMPFILE
  30. #echo grep -i $STERM $MEMEDIR/20/1/2/booksread >> $TMPFILE
  31. #echo grep -i $STERM $MEMEDIR/20/1/3/alreadyread.txt >> $TMPFILE
  32. #echo grep -i $STERM $MEMEDIR/20/1/4/alreadyread.txt >> $TMPFILE
  33. #echo grep -i $STERM $MEMEDIR/20/1/5/alreadyread.txt >> $TMPFILE
  34. #echo grep -i $STERM $MEMEDIR/20/1/6/alreadyread.txt >> $TMPFILE
  35. #echo grep -i $STERM $MEMEDIR/20/1/7/alreadyread.txt >> $TMPFILE
  36. #echo grep -i $STERM $MEMEDIR/20/1/8/alreadyread.txt >> $TMPFILE
  37. #echo grep -i $STERM $MEMEDIR/20/1/9/alreadyread.txt >> $TMPFILE
  38. #echo grep -i $STERM $MEMEDIR/20/2/0/alreadyread.txt >> $TMPFILE
  39. #echo grep -i $STERM $MEMEDIR/20/2/1/alreadyread.txt >> $TMPFILE
  40. #echo grep -i $STERM $MEMEDIR/20/2/2/alreadyread.txt >> $TMPFILE
  41. #echo grep -i $STERM $MEMEDIR/20/2/3/alreadyread.txt >> $TMPFILE
  42. chmod 755 $TMPFILE
  43. $TMPFILE
  44. echo $TMPFILE
  45. # rm $TMPFILE