/* Script to delete lines containing a search string from a file. (C) by Luca Viola, 1996 */ parse arg from' 'to' 'search if arg()==0 | fileout=='' | search=='' then do say "deleteline FROM/A,TO/A,SEARCHSTRING/A" exit end if ~open( 'filein',from,"R" ) then do say "file not found "||from exit 1 end if ~open( 'fileout',to,"W" ) then do say "cannot open dest file "||to exit 2 end do until eof('filein') line=readln('filein') t=pos(search,line) if t==0 then writeln('fileout',line) else iterate end close( 'filein' ) close( 'fileout' )