git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to get bash to shut up about SIGPIPE?
@ 2005-04-28 18:28 Linus Torvalds
  2005-04-28 19:03 ` Rene Scharfe
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Linus Torvalds @ 2005-04-28 18:28 UTC (permalink / raw)
  To: Git Mailing List, Petr Baudis


Right now my major gripe with cogito is "cg-log" (which is actually the 
only command I use right now, everything else I just do by hand with the 
raw git archive) is that bash is being an ass about SIGPIPE, and when I 
only look at the top part of the log, ie I do something like:

	torvalds@ppc970:~/src/cogito> git log | head

it spews out the ten first lines of the log, and then it spews about a 
million lines (well, 20, but anyway) of crap:

	/home/torvalds/bin/cg-log: line 87:  6338 Done                    echo -n $color$key $rest
	      6339 Broken pipe             | sed "s/>.*/> ${pdate/+0000/$tz}/"
	/home/torvalds/bin/cg-log: line 87:  6328 Done                    cat-file commit $commit
	      6329 Broken pipe             | while read key rest; do
	    case "$key" in 
	        "author" | "committer")
	            if [ "$key" = "author" ]; then
	                color="$colauthor";
	            else
	                color="$colcommitter";
	            fi; date=(${rest#*> }); sec=${date[0]}; tz=${date[1]}; dtz=${tz/+/}; lsec=$(expr $dtz / 100 \* 3600 + $dtz % 100 \* 60 + $sec); pdate="$(date -Rud "1970-01-01 UTC + $lsec sec" 2>/dev/null)"; if [ "$pdate" ]; then
	                echo -n $color$key $rest | sed "s/>.*/> ${pdate/+0000/$tz}/"; echo $coldefault;
	            else
	                echo $color$key $rest $coldefault;
	            fi
	        ;;
	        "")
	            echo; sed -re '
	                                        / 
	*Signed-off-by:.*/Is//'$colsignoff'&'$coldefault'/
	                                        s/./    &/
	                                '
	        ;;
	        *)
	            echo $colheader$key $rest $coldefault
	        ;;
	    esac;
	done

which is just incredibly annoying, since it makes the ten lines I actually 
_wanted_ to get scroll off the screen..

Damn bash. What's the magic incantation that says SHUT UP!?

		Linus

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2005-05-04  8:21 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-28 18:28 How to get bash to shut up about SIGPIPE? Linus Torvalds
2005-04-28 19:03 ` Rene Scharfe
2005-04-28 19:21   ` Linus Torvalds
2005-04-28 20:13     ` Rene Scharfe
2005-04-28 20:27     ` Ryan Anderson
2005-04-28 20:47       ` Linus Torvalds
2005-05-01 12:07       ` Herbert Xu
2005-05-01 15:51         ` David A. Wheeler
2005-05-02 16:10           ` Paul Jackson
2005-05-04  2:30             ` David A. Wheeler
2005-05-04  2:50               ` Linus Torvalds
2005-05-04  8:26                 ` Herbert Xu
2005-04-28 21:31 ` Edgar Toernig
2005-04-28 22:16   ` Linus Torvalds
2005-04-29  1:00 ` Joshua T. Corbin
2005-04-30  0:22 ` Paul Jackson
2005-04-30  2:59   ` Linus Torvalds
2005-04-30  6:29     ` Paul Jackson
2005-04-30 11:04       ` Rene Scharfe
2005-05-02 22:17         ` Paul Jackson
2005-05-02 23:17         ` Petr Baudis
2005-05-03  1:44           ` Paul Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).