I use bash after the script to search for a string in files:
find $1 -name "$2" -exec grep -Hn "$3" {} \;
Sometimes this script failed to execute
grep: /proc/sysrq-trigger: Input/Output error
To solve this problem, I first decided to exclude this file from the search result. it is a good idea, and if so, how can I do this? Is there any other solution to avoid my script failure?
source
share