I have a script which has got so far:
file .* | awk -F: '/text/ {print $1}'
as you can see, it hasn't got very far - but it does output a list of the filenames of files identified as text files (rather than directories, binaries or etc). The next thing I need Awk to do is open each of these files and look for a text string (eg 'mother').
I would guess that I would need to put the value of $1 into a variable (chk = $1)and then I need to search the file. Ideally I need to be able to nest something like:
{/mother/ {print chk} chk}
close chk}
but I can't work out how to do it. Any advice would be gratefully received!
duncan