I have 2 big files and I want to make a diff between the top lines of each files, but i don\'t want to use intermediate files. I would like to do something like that :
You're probably thinking of process substitution in bash. For example, try:
diff <(head -n 2000 file1.log) <(head -n 2000 file2.log)