25 Jun
2000
25 Jun
'00
15:38
[S.Toms]
How can I test to see if a particular file contains a particular string anywhere within it, for example, I want to see if the filename contains .lock as the suffix.
Hello. I think the following might work (from memory, untested): if grep -s 'STRING' FILE >/dev/null; then ACTIONS_IF_FOUND else ACTIONS_IF_NOT_FOUND fi -- François Pinard http://www.iro.umontreal.ca/~pinard -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/