I want to see diffbetween the paragraph in the middle of the file and the file containing one paragraph.
A paragraph is in the line of the 60file foo, and the file barcontains only this paragraph with possible minor differences.
I can remove this paragraph, using sed: sed -n 60,60p foo. How can i use this in diff?
The following steps do not work:
sed -n 60,60p foo | diff bar # diff: missing operand after `foo`
diff bar `sed -n 60,60p foo` # diff: extra operand `in`
I can do:
sed -n 60,60p foo >> tempfile; diff bar tempfile
Is there a solution that does not require me to temporarily store using a channel?
source
share