On Tue, 2007-10-09 at 12:25 -0700, Saladin Sharif wrote: > But what I am really after is being able to set a flag if the file > contains one or more lines of text.
oh you are looking to do something like : cat log.txt | grep "a string" | wc -l <loadfile srcfile="${output}" property="contains.errors"> <filterchain> <linecontains> <contains value="${lookingFor}"/> </linecontains> </filterchain> </loadfile> <echo file="${basedir}/temp.txt" message="${contains.errors}"/> So now you have the lines from the ${output} which contain ${lookingFor} in a temp file temp.txt After this, you could use the example Matt gave to find out the number of lines in temp.txt Hope this helps. -- -Prashant Don't upload, just share : www.dekoh.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]