302 @verb #3152:"file_grep" this none this rxdo #3152 @program #3152:"file_grep" this none this "Syntax: file_grep(object, file, text, case-sensitive)" "Returns 0 if text is not found, and a line number if the text is found." {?object = #-1, ?file = "", ?text = " ", ?case = 0} = args valid(object) && typeof(file) == $STR || raise(E_INVARG, "Object must be valid and file must be a string.") f = 0 if (!object:fileexists(file) || $file_utils:is_binary(object, file) || !object:fileaccess(file)) return f else for x in (object:fileread(file)) f = f + 1 if (index(x, text, case)) return f endif ticks_left() > 100 || $cmd_utils:suspend_if_needed(1) endfor endif "Last modified by Dax (#789) on Tue May 3 14:03:28 2005 MDT." . 0