Tagged: bash

Find text string in file

I save a script named “findtext” that will look inside any file smaller than my maximum (avoiding searching huge binary file) #!/bin/bash maxFileSize=10M #don’t search inside huge binary files if [ $# -eq 1 ]; then srchText=$1 fDir=”.” fntmp=”*” elif [ $# -eq 2 ]; then fDir=$1 srchText=$2 fntmp=”*” elif [ $# -eq 3 ]; […]