Bash check diff starting at specific line Code Example
bash check diff starting at specific line
# Basic syntax:
diff <(head -n | tail -n ) <(head -n file2 | tail -n )
# Where:
# - head and tail are used to select the rows of file_1 and file_2 that
# are passed to the diff command (using <() )
# Example usage:
# To compare the 80th to 100th row of file_1 to to 100th to 120 row of file_2:
diff <(head -n 100 file_1 | tail -n 20) <(head -n 120 file_2 | tail -n 20)