blob: 464cf92780cbc2062a0b0e38a3cbd0c0af6f2c88 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/bin/bash
if [ $# -eq 0 ]; then
echo No arguments
exit 1
fi
FILES=()
for arg in $@; do
[ -d $arg ] && FILES+=($(find $arg -type f))
[ -f $arg ] && FILES+=($arg)
done
grep -IHn -e ".*\s$" ${FILES[@]}
|