Questions tagged [agrep]

Questions about agrep, a version of grep with specific enhancements, most prominently the ability to search for approximate patterns. Please only use this tag if your question is about `agrep` specifically.

6 questions
16
votes
1 answer

agrep with directionally biased penalties

I am using tre-agrep (manpage), an implementation of agrep (manpage), to perform approximate pattern matching. This utility searches for matches based on Levenshtein distance, and the user can configure the penalty applied for substitution,…
user001
  • 3,598
  • 5
  • 39
  • 54
12
votes
1 answer

inexact text search

Is there any utility like grep or even uniq but for inexact search, or I should write it myself? I mean it will look at 90% (number may vary) matching, or something like that. For example I have file with several…
rush
  • 27,055
  • 7
  • 87
  • 112
6
votes
2 answers

Specify word length in agrep?

I am using agrep to find similar spelling words, for example: agrep -1 hack /usr/share/dict/words But it returns too many words, so I also hope the length of the word is same as the keyword. How can I specify that?
Tim
  • 98,580
  • 191
  • 570
  • 977
3
votes
2 answers

Generate suggestions for errors from a lookup dictionary

EDIT: the files were changed to tsv to deal better with spaces in text fields I have 2 csv files in the following form: File 1: availableText.csv (can be very big) "id1" , "text1-1" "id1" , "text1-2" "id1" , "text1-3" "id1" , "text1-4" …
jimkont
  • 131
  • 5
1
vote
2 answers

A combination of uniq and agrep?

I have a file full of long SQL queries, one per line. I need to create a list of unique queries, but most of the queries include parameter values that make using an exact matching tool like uniq impossible. Is there a way to find unique lines…
Matt Alexander
  • 725
  • 1
  • 7
  • 20
0
votes
2 answers

How to extract delimited entries that match criteria?

I have a log file where each entry is delimited by a series of ---, similar to this: ----------------- Name=Operation1 Time: 100 Status=Success ----------------- Name=Operation1 Time: 500 Status=Failure ----------------- Name=Operation2 Time:…
chemdog95
  • 101
  • 1