Reputation: 139
this is a rather low-level question but how do you limit diff's output to (for example) 5 lines.
I am running bourne shell and I know about diff -c and diff -c 5, but none of those commands are working for me. Is there another way to do that?
Upvotes: 1
Views: 1258
Reputation: 34677
Which diff are you using, on NetBSD, I can limit it using the following:
% diff ~/.zshrc* | grep '[<>]' | head -5
< setopt autocd interactivecomments
< CASE_SENSITIVE="true"
< DISABLE_LS_COLORS="true"
< #plugins=(git)
> plugins=(git)
Hope that helps!
Upvotes: 2