I\'m trying to compare column 1 from file1 and column 3 from file 2, if they match then print the first column from file1 and the two first columns from file2.
here
You can use this awk:
awk
awk -F '[| ]+' -v OFS='\t' 'NR==FNR{a[$4]=$1 OFS $2; next} $1 in a{print $1, a[$1]}' file2 file1 Cre01.g000100 chromosome_1 99034 Cre01.g000500 chromosome_1 71569 Cre01.g000650 chromosome_1 93952