linuxkurs/beispiele/4/recursive-grep-in-file.sh
2019-01-08 13:08:27 +01:00

8 lines
87 B
Bash

#!/bin/bash
if [ -n $2 ]
grep -r --include="*.$2" "$1" .
else
grep -r "$1" .
fi