Questions tagged [pattern-matching]

169 questions
1
vote
1 answer

Test if values in file1 are contained in column5 of another file

i have 2 text files: file1 contains only one column with a series of id values; file2 contains many columns. I need to check whether the values of file1 are contained in column2 of file2; the values of file1 only have to be contained in the values…
sebw
  • 11
1
vote
2 answers

sed or awk to print between 2 patterns[excluding the patterns]

I have the following text.. [start] this is my line [end] My output should be: this is my line Need help.. Tried a combination of : sed -n '/start/,/end/p' $File & sed -e "s/]/']/" -e "s/\[/['/" $file but it brings up the pattern too.
veekay
  • 11
-2
votes
1 answer

Determining repetitions of 8-tuples

I have 16 collections of 8 numbers (11 12 11 44 11 12 11 23) (12 21 11 44 11 12 11 23) (11 42 21 13 12 21 31 14) (11 42 21 13 12 21 11 34) and so on I want to find whether there are repetitions of each 8-tuple. The order in which the numbers occur…
Vera
  • 1,223