I had a script that failed, with the term "interlisted" in it. I needed to find it, so I swept though the directory tree looking for it. I did not find it.
That find should have found the script used.It should look at every file and preform a grep -H -l and list the name of the script that contains interlisted.
find /home/big_bank/ -type f -exec grep -H -l "*interlisted*" {} \; > /tmp/find_interlisted &
find /home/big-bank/ -type f -exec grep -H -l "*inter*" {} \; > /tmp/find2_interlisted &
Yet the script was 2 levels down from ${HOME} which was /home/big_bank/
$ cat ${HOME}/scripts/stocks_script.ksh | grep interlisted
TS_INTERLISTED="${HOME}/data/interlisted_securities_${TRDDATE}.txt";
FINAL_OUTPUT_FILE3="interlisted_securities_${TRDDATE}.txt";
sqlplus -S $ETDHUB @${HOME}/data/sql/interlisted_query.sql | sort -t'|' -k1,1 | \
Could I have constructed the find statment better, did I make some mistake. I can't believe that the find did not find it.
This finds it.
grep -H -l -r "interlisted" /home/big_bank/*