Skip to main content
Improving question title to match requirements.
Source Link

How to diff partonly the first line of a filetwo files?

I want to diff only the first line of two files, as opposed to the entire file. How would I do that? I only need a solution for the the first line, but if you could specify the number of lines that would be a much better answer.

So diff would return no differences between the following two files:

a
1
2

. and:

a
3
4

How to diff part of a file

I want to diff only the first line of two files, as opposed to the entire file. How would I do that? I only need a solution for the the first line, but if you could specify the number of lines that would be a much better answer.

So diff would return no differences between the following two files:

a
1
2

.

a
3
4

How to diff only the first line of two files?

I want to diff only the first line of two files, as opposed to the entire file. How would I do that? I only need a solution for the the first line, but if you could specify the number of lines that would be a much better answer.

So diff would return no differences between the following two files:

a
1
2

and:

a
3
4
edited tags
Link
gsgx
  • 1k
  • 5
  • 16
  • 26
Source Link
gsgx
  • 1k
  • 5
  • 16
  • 26

How to diff part of a file

I want to diff only the first line of two files, as opposed to the entire file. How would I do that? I only need a solution for the the first line, but if you could specify the number of lines that would be a much better answer.

So diff would return no differences between the following two files:

a
1
2

.

a
3
4