How to diff top lines of two files without intermediate file

前端 未结 1 1462
难免孤独
难免孤独 2020-12-25 11:49

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 :

相关标签:
1条回答
  • 2020-12-25 12:17

    You're probably thinking of process substitution in bash. For example, try:

     diff <(head -n 2000 file1.log) <(head -n 2000 file2.log)
    
    0 讨论(0)
提交回复
热议问题