Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # The first argument is the search term. Can be more than one word but you need quotation marks.
- # The other terms are filenames.
- # TODO: Keep color from grep
- count=0
- for i in "$@"; do
- if [ $count -eq 0 ]; then
- term=$i
- count=$(($count+1))
- else
- pdftotext "$i" - | grep --color=always -i "$term" | sed -e "s/^/$i: /"
- count=$(($count+1))
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement