- Subject: Re: suppress "lines read" message
- From: Brian Blais <bblais@xxxxxxxxxx>
- Date: Mon, 07 Jun 2004 08:56:35 -0400
On Mon, Jun 07, 2004 at 09:15:23AM +0200, Paul Boekholt wrote:
> On Sat, Jun 05, 2004 at 05:30:29PM -0400, Brian Blais wrote:
> > Is there a way to suppress the "lines read" message that find_file()
> > outputs to the screen? In a jed script calling find_file many times,
> > this message is a bit distracting.
>
>
> ()=find_file(file); clear_message();
>
>
> Maybe you should use read_file() instead.
I think I may have been unclear. Let me be a bit more specific, and maybe
that will help. If I make a script called ff.sl, containing:
#!/usr/local/bin/jed -script
find_file("ff.sl");
if (fsearch("chickens")) {
printf("I found the string 'chickens'\n");
}
%-----------------------------------------------
then I run it like:
/home/bblais-> ./ff.sl
9 lines read
I found the string 'chickens'
I get the same when I replace find_file with read_file, or with
()=find_file("ff.sl");
I can get around it, with a hack like this ff2.sl script:
#!/usr/local/bin/jed -script
define find_file2(fname) {
sw2buf("blah");
insert_file(fname);
bob();
}
()=find_file2("ff2.sl");
if (fsearch("chickens")) {
printf("I found the string 'chickens'\n");
}
%-----------------------------------------------
/home/bblais/-> ./ff2.sl
I found the string 'chickens'
If you are opening a lot of files, especially large ones, then this is slower
than find_file. Is there a way to override the "X lines read" output when
using find_file or read_file?
thanks,
Brian Blais
--
-----------------
bblais@xxxxxxxxxx
http://web.bryant.edu/~bblais
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2004 date index]
[2004 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]