Subject: Re: "fprintf(stdout, ..." in sysctl(8).
To: None <mason@primenet.com.au>
From: Simon Burge <simonb@netbsd.org>
List: tech-userlevel
Date: 05/27/2000 16:54:26
Geoff Wing wrote:

> Simon Burge <simonb@netbsd.org> typed:
> :No harder than s/printf(/fprintf(outfp)/, or even "foo > outfile" :-)
> 
> % echo 'sprintf(foo, "blah");' | sed 's/printf(/fprintf(outfp)/'
> sfprintf(outfp)foo, "blah");
> % echo 'fprintf(stderr, "blah");' | sed 's/printf(/fprintf(outfp)/'
> ffprintf(outfp)stderr, "blah");
>
> Besides the typo in your substitution, maybe a bit harder :-)

Ok, in vi:

	:%s/\<printf(/fprintf(outfp, /

then :-)

Simon.