From owner-freebsd-hackers@FreeBSD.ORG Mon May 26 15:54:22 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC1271065670 for ; Mon, 26 May 2008 15:54:22 +0000 (UTC) (envelope-from mathieu.prevot@gmail.com) Received: from hu-out-0506.google.com (hu-out-0506.google.com [72.14.214.232]) by mx1.freebsd.org (Postfix) with ESMTP id 31F5C8FC13 for ; Mon, 26 May 2008 15:54:21 +0000 (UTC) (envelope-from mathieu.prevot@gmail.com) Received: by hu-out-0506.google.com with SMTP id 34so3032874hue.8 for ; Mon, 26 May 2008 08:54:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=iFylUVcDRnyAF/RTyQt20juA6oCX1/i1nGdib3JTNvU=; b=QlpORqFd4RGs8yqoYfLnH+nIgSq9FdX36qli7J9twCzThmSnMbe9SmwBN5WsJFFOW8VWjHW3VBajcYYA54pBAfrkEvlJsHQn3Y8t4+5bmn59++dMGQP/1h/yqdDDJ4T631EN9AbqedNlZ+q3q2ELrepK0xI1u9oYLDQMUrkYfTY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=a1YQ2sMV9TeXa2pdHqbDHJI37zCcFk7HcFOQvWrEfYcTYbEzCMKkM2nwPtIDsUy4LBrhKgBg/jVT+QTHHeOUGVk8DXfuXqq25c02Uv7pNmLSjQawq+rw5UMMXHkDOgesKnbrFvrwH40fO5r4uWYU3qbBhAvwGqSi88Y1Mds81N8= Received: by 10.82.191.3 with SMTP id o3mr160687buf.17.1211808419071; Mon, 26 May 2008 06:26:59 -0700 (PDT) Received: by 10.82.170.10 with HTTP; Mon, 26 May 2008 06:26:59 -0700 (PDT) Message-ID: <3e473cc60805260626k2469143ay9b0d52ea4044938b@mail.gmail.com> Date: Mon, 26 May 2008 15:26:59 +0200 From: "Mathieu Prevot" To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: flush file descriptor in a sh script while passing through a pipe X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2008 15:54:22 -0000 Hi, Let's be an example. With 1) I have a progress bar that is updated regularly but with 2) I have to wait for the end of the download (the next \n character ?) ... 1) wget http://tinyurl.com/5ztnb2 2) wget http://tinyurl.com/5ztnb2 --progress=bar:force 2>&1 | sed '/^Location/d;/^HTTP/d;/^--/d' I would like the progress bar to be updated through sed ... how can I flush the file descriptor from sh or with a tiny command/signal ? Thanks Mathieu