The Advanced Text Search Utility is a powerful, interactive command-line tool designed for efficient and flexible searching across multiple text files. It combines the functionality of grep, awk, and sed with additional features like fuzzy matching, parallel processing, and result filtering.
- Simple and case-insensitive searches
- Multiple term searches
- Regular expression support
- Field extraction using AWK
- Search and replace using SED
- Fuzzy matching
- File type filtering
- Parallel processing for faster searches
- Interactive result filtering
- Export results in various formats (txt, json, csv)
- Search history and command repetition
- Detailed search statistics
-
Clone this repository: it clone https://github.com/Z3r0n3us/Advanced-Text-Search-Utility cd advanced-text-search
-
Create a virtual environment (optional but recommended): python -m venv venv source venv/bin/activate # On Windows, use venv\Scripts\activate
-
Install the required packages: pip install -r requirements.txt
Run the script using Python:
python text_search.py
Follow the interactive prompts to:
- Specify the file pattern to search
- Choose search options
- Execute the search
- Filter, save, or perform new searches on the results
Here are some example use cases:
-
Search for a simple term in all text files:
- File pattern:
*.txt - Search option: Simple Search
- Term: "example"
- File pattern:
-
Perform a case-insensitive search for multiple terms:
- File pattern:
*.log - Search option: Case-Insensitive Search
- Terms: "error,warning,critical"
- File pattern:
-
Use regular expressions to find email addresses:
- File pattern:
*.md - Search option: Regular Expression Search
- Regex:
\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b
- File pattern:
-
Extract specific fields from log files:
- File pattern:
app.log - Search option: Extract Specific Field (AWK)
- Pattern:
$3 == "ERROR" - Action:
{print $1, $2, $4}
- File pattern:
Contributions to the Advanced Text Search Utility are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.