a column from one Query against another Query cut -f $col $input1 | grep -f - $match $input2 > $out_file1 This tool is based on UNIX command grep with option -f. It matches content of one query against another. For example, assume you have two queries - one that contains EST accession numbers and some other information:: AA001229 12 12 A001501 7 7 AA001641 6 6 AA001842 6 6 AA002047 6 6 AA004638 3 3 and another that is a typical BED file describing genomic location of some ESTs:: chr7 115443235 115443809 CA947954_exon_0_0_chr7_115443236_f 0 + chr7 115443236 115443347 DB338189_exon_0_0_chr7_115443237_f 0 + chr7 115443347 115443768 DB338189_exon_1_0_chr7_115443348_f 0 + chr7 115443239 115443802 AA001842_exon_0_0_chr7_115443240_f 0 + chr7 115443243 115443347 DB331869_exon_0_0_chr7_115443244_f 0 + chr7 115443347 115443373 DB331869_exon_1_0_chr7_115443348_f 0 + Using this tool you will bne able to tell how many ESTs in Query1 are also preset in Query2 and will output this:: chr7 115443239 115443802 AA001842_exon_0_0_chr7_115443240_f 0 if **Match** option is chosen.