/* Scans the CONFIG.SYS file for a specified string */ Parse Arg Target Target_Uppercase=Translate(Target) /* Exit if the user didn't supply a string for the search */ If Target="" then Do Say " " Say "You must enter a string to find..." Exit end /* do */ /* Copy CONFIG.SYS to CONFIG.TST for safety Assumes that CONFIG.SYS is in the root directory of the C: drive change as appropriate */ "copy c:\config.sys config.tst" /* Exit if we can't find the file */ if rc<>0 then Do Say " " Say "Could not find CONFIG.SYS!" Exit end /* do */ /* Now search the file for the target string */ Current_Line_Number=0 Do While Lines("CONFIG.TST") a_line=Linein("CONFIG.TST") Current_Line_Number=Current_Line_Number+1 Test_Line=Translate(a_line) Found=Pos(Target_Uppercase,Test_Line) If Found<>0 then Do Say Current_Line_Number a_line end /* do */ end /* do */ rc=Stream("CONFIG.TST","C","Close") Exit