• Searching a file for text

    From Willowolf@VERT/WOLFGROT to All on Sunday, January 13, 2002 09:29:00
    Is there a way to search a file for a certain word or phrase using Baja?

    If I was to write to a file, I want to check that file for duplicate phrases before the write is done to eliminate dupicate entries. Is this possible in Baja?

    I've read through the File I/O functions in the Baja Documentation and found nothing that will search a file for a specific word or phrase.

    Thanks,
    \\/

    ---
    þ Synchronet þ Wolf Grotto = Las Vegas, Nevada USA = wolfgrotto.darktech.org
  • From Amcleod@VERT to Willowolf on Wednesday, January 16, 2002 09:25:04
    RE: Searching a file for text
    BY: Willowolf to All on Sun Jan 13 2002 05:29 pm

    Is there a way to search a file for a certain word or phrase using Baja

    I think you will have to build your own search function out of File I/O primitives.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Willowolf on Wednesday, January 16, 2002 18:53:03
    RE: Searching a file for text
    BY: Willowolf to All on Sun Jan 13 2002 05:29 pm

    Is there a way to search a file for a certain word or phrase using Baja

    If I was to write to a file, I want to check that file for duplicate phrases before the write is done to eliminate dupicate entries. Is this possible in Baja?

    I've read through the File I/O functions in the Baja Documentation and found nothing that will search a file for a specific word or phrase.

    The only Baja function that will do this is the trashcan function, but it will only search text/*.can files.

    -Rob

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Amcleod@VERT to Digital Man on Wednesday, January 16, 2002 22:49:02
    RE: Searching a file for text
    BY: Digital Man to Willowolf on Thu Jan 17 2002 02:53 am

    Is there a way to search a file for a certain word or phrase using B

    The only Baja function that will do this is the trashcan function, but it wi only search text/*.can files.

    Ingenious!

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Willowolf@VERT/WOLFGROT to Digital Man on Wednesday, January 16, 2002 23:00:00
    [Reply to]: Searching a file for text
    [Typed by]: Digital Man to Willowolf on Thu Jan 17 2002 02:53 am

    RE: Searching a file for text
    BY: Willowolf to All on Sun Jan 13 2002 05:29 pm

    Is there a way to search a file for a certain word or phrase using B

    If I was to write to a file, I want to check that file for duplicate phrases before the write is done to eliminate dupicate entries. Is this possible in Baja?

    I've read through the File I/O functions in the Baja Documentation a found nothing that will search a file for a specific word or phrase.

    The only Baja function that will do this is the trashcan function, but it wi only search text/*.can files.

    -Rob

    I'll read the docs on it, thanks.

    \\/

    ---
    þ Synchronet þ Wolf Grotto = Las Vegas, Nevada USA = wolfgrotto.darktech.org