summaryrefslogtreecommitdiff
path: root/ogrep
blob: cba02c23b8aac47bf174c8c4942cb6fc54c6e8b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

#grep for odt files
if [[ -z $1 || -z $2 ]]; then
	echo "usage: ogrep [pattern] [file(s)]"
	exit 0
fi
for f in `find ${2} -type f -name "*odt"`; do
	res=`odt2txt ${f} | grep ${1}`
	if [[ $res ]]; then
		echo "${f}: ${res}"
	fi
done