in reply to File search using Grep
Apart from other things, this has the problem that it looks for that string of digits anywhere in the line. Are you sure it will not be found in some other column? Are you sure there will never be an account whose ID contains that number as a substring?
If the file changes seldom and you need to search it often, you should probably import it into an on-disk hash (DB_File, GDMB, SDBM, ...) or to a database (even just DBD::SQLite would help). Or maybe you should keep it in the database and change the other program(s) that use it to look for the data in the database or on-disk hash.
Jenda
Enoch was right!
Enjoy the last years of Rome.
|
|---|