From owner-freebsd-bugs Mon Jul 1 17:40:10 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1F7AC37B401 for ; Mon, 1 Jul 2002 17:40:04 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F2A643E26 for ; Mon, 1 Jul 2002 17:40:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g620e2JU068645 for ; Mon, 1 Jul 2002 17:40:02 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g620e1DD068644; Mon, 1 Jul 2002 17:40:02 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF57437B400 for ; Mon, 1 Jul 2002 17:34:03 -0700 (PDT) Received: from www.freebsd.org (www.FreeBSD.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74F5843E09 for ; Mon, 1 Jul 2002 17:34:03 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.4/8.12.4) with ESMTP id g620Y3OT080656 for ; Mon, 1 Jul 2002 17:34:03 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.4/8.12.4/Submit) id g620Y3As080655; Mon, 1 Jul 2002 17:34:03 -0700 (PDT) Message-Id: <200207020034.g620Y3As080655@www.freebsd.org> Date: Mon, 1 Jul 2002 17:34:03 -0700 (PDT) From: Rob Anderson To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: bin/40101: sed buffers one line of output before writing to stdout Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 40101 >Category: bin >Synopsis: sed buffers one line of output before writing to stdout >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 01 17:40:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Rob Anderson >Release: 4.5-STABLE >Organization: Isilon Systems Inc. >Environment: FreeBSD beasly.isilon.com 4.5-STABLE FreeBSD 4.5-STABLE #3: Thu Apr 18 15:58:15 PDT 2002 toor@beasly.endurantsystems-internal.com:/usr/src/sys/compile/ROB i386 >Description: sed buffers a full line before writing to stdout. For example, if I enter "sed 's/foo/bar/'" at the prompt, I get the following interaction: blah <--- I enter this, get no response foobar <--- I enter this... blah <--- suddenly, the response to my 'blah' is printed stuff <--- I enter this... barbar <--- now, the response to 'foobar' is printed This is _not_ the behavior in Linux sed...Linux sed prints out every line as it is processed. 'perl -pe' also prints out lines as they are processed. Only BSD sed exhibits this property. I couldn't find anything in the manpage that explains why BSD sed behaves this way. >How-To-Repeat: See above... repeats every time. Just run sed with any command, and you'll get this behavior. >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message