## Example 1 : A simple search example using find ## Searches for string in all files ... (here it is 'trap') within a specified ## folder and logs to a file for i in `find /users -type f` do grep -w "trap" $i 2>/dev/null 1>/dev/null if [ $? = 0 ] ; then echo "File Exists In : $i" | tee -a sqlex else echo "File Does Not Exist In : $i" | tee -a sqlnex fi done