Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [ -e $2 ];
- then
- OIFS=$IFS
- IFS=$'\n'
- for file in $(find $2 -type f);
- do
- if [ -r $file ];
- then
- if grep $1 -q $file;
- then
- ls -sh $file
- fi
- else
- echo "Can't open file $file"
- fi
- done
- IFS=$OIFS
- else
- echo "Directory $2 not found"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement