when-did-I-read-this 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/bash
  2. # Copyright 2021 Jeff 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 (ie at COPYING.GPL)
  16. # If not, see <https://www.gnu.org/licenses/>.
  17. MEMEDIR=/mnt/disk5/meme
  18. STERM='"'"${@:1}"'"'
  19. TMPFILE=`mktemp`
  20. echo grep -H -i $STERM $MEMEDIR/20/0/2/booksread >> $TMPFILE
  21. echo grep -H -i $STERM $MEMEDIR/20/0/3/booksread.txt >> $TMPFILE
  22. echo grep -H -i $STERM $MEMEDIR/20/0/5/booksread >> $TMPFILE
  23. echo grep -H -i $STERM $MEMEDIR/20/0/6/books-read-2006 >> $TMPFILE
  24. echo grep -H -i $STERM $MEMEDIR/20/0/7/books-read-2007 >> $TMPFILE
  25. echo grep -H -i $STERM $MEMEDIR/20/0/8/booksread >> $TMPFILE
  26. echo grep -H -i $STERM $MEMEDIR/20/0/9/booksread >> $TMPFILE
  27. echo grep -H -i $STERM $MEMEDIR/20/1/0/booksread >> $TMPFILE
  28. echo grep -H -i $STERM $MEMEDIR/20/1/1/booksread >> $TMPFILE
  29. echo grep -H -i $STERM $MEMEDIR/20/1/2/booksread >> $TMPFILE
  30. echo grep -H -i $STERM $MEMEDIR/20/1/3/alreadyread.txt >> $TMPFILE
  31. echo grep -H -i $STERM $MEMEDIR/20/1/4/alreadyread.txt >> $TMPFILE
  32. echo grep -H -i $STERM $MEMEDIR/20/1/5/alreadyread.txt >> $TMPFILE
  33. echo grep -H -i $STERM $MEMEDIR/20/1/6/alreadyread.txt >> $TMPFILE
  34. echo grep -H -i $STERM $MEMEDIR/20/1/7/alreadyread.txt >> $TMPFILE
  35. echo grep -H -i $STERM $MEMEDIR/20/1/8/alreadyread.txt >> $TMPFILE
  36. echo grep -H -i $STERM $MEMEDIR/20/1/9/alreadyread.txt >> $TMPFILE
  37. echo grep -H -i $STERM $MEMEDIR/20/2/0/alreadyread.txt >> $TMPFILE
  38. echo grep -H -i $STERM $MEMEDIR/20/2/1/alreadyread.txt >> $TMPFILE
  39. echo grep -H -i $STERM $MEMEDIR/1990s -r >> $TMPFILE
  40. chmod 755 $TMPFILE
  41. $TMPFILE | awk -F'/' '{print $5 $6 $7}'
  42. # echo $TMPFILE
  43. # rm $TMPFILE