var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Search text in all files in directory
I am attempting to search all files in the current for searchText. Then display the filename, line number, and entire line.
What I am thinking of doing is:
grep il "searchText" > tempFile
then look through the temp file and extract each file name, and use another grep or maybe an awk statement to display the filename, line number, and entire line.
I am sure this is a round-about way of doing things. I am attempting this in a Bourne shell so if anyone can help me thank you.
grep -rn "search pattern" * > outfile
n- line number
Out put will be like this
FileName: lineNumber: line