search in-text?

Discussion in 'NDS - Flashcarts and Accessories' started by questionsleep, Apr 23, 2008.

Apr 23, 2008

search in-text? by questionsleep at 11:26 PM (933 Views / 0 Likes) 4 replies

  1. questionsleep
    OP

    Newcomer questionsleep Newbie

    Joined:
    Apr 23, 2008
    Messages:
    6
    Location:
    Michigan
    Country:
    United States
    I desire to search a large text file, on my DS.
    For example, I have the text of an encyclopedia, and I look up a specific word and it finds it, just like control F.

    Are there any applications which do this?
    Any similar options? Perhaps searching a saved website?
     
  2. DanTheManMS

    Member DanTheManMS aka Ricochet Otter

    Joined:
    Jun 2, 2007
    Messages:
    4,325
    Location:
    Georgia
    Country:
    United States
    The only thing I can think of is Vi in DSLinux (press the slash key to enter a word to search for) but you'd almost certainly need slot-2 RAM to open such a large text file without crashing.
     
  3. Jools

    Newcomer Jools Advanced Member

    Joined:
    Dec 12, 2005
    Messages:
    80
    Country:
    Japan
    Thats a shame, I'd really like to do that too.
     
  4. questionsleep
    OP

    Newcomer questionsleep Newbie

    Joined:
    Apr 23, 2008
    Messages:
    6
    Location:
    Michigan
    Country:
    United States
    Would you be able to tell me how to do this, exactly?
    I got Linux on my DS, but I have no idea how to do this "Vi" thing.
    And, the file I need to look at is only 2.4 MB?
     
  5. DanTheManMS

    Member DanTheManMS aka Ricochet Otter

    Joined:
    Jun 2, 2007
    Messages:
    4,325
    Location:
    Georgia
    Country:
    United States
    But the DS only has 4 MB of RAM, and DSLinux uses up a huge chunk of that so that by the time you're done you've only got a few hundred KB of free RAM for running programs. Try it on a small text file first.

    Regardless, once you get inside and are presented with the flashing cursor, type "vi path/to/file.txt". Note that to access the root of your card it's /media/ and spaces must be preceded by a backslash for Linux to handle them properly. Therefore, to access a file in "(root)\Ebooks\Alice In Wonderland.txt" you would type:
    Code:
    vi /media/Ebooks/Alice\ In\ Wonderland.txt
    Tab-completion makes this process much much easier. Start typing the first few letters of the file or folder name and hit Tab to have it automatically complete the name for you. Much faster, and it automatically adds the backslashes for you.

    Once you've got it opened, hit the slash key and type the phrase you wish to find and hit Enter. To escape Vi, press Shift+; to create a colon, type q! and hit Enter to force it to close without saving any changes.

    Vi is a bit complicated, I'll admit, but the page on the DSLinux wiki for Vi explains it better than I can. Use it if you get stuck.
     

Share This Page