From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 13 21:47:47 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DCE5106566B for ; Sat, 13 Nov 2010 21:47:47 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id C386F8FC0A for ; Sat, 13 Nov 2010 21:47:46 +0000 (UTC) Received: by qyk2 with SMTP id 2so732887qyk.13 for ; Sat, 13 Nov 2010 13:47:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=SkZggJ+eyjklaPNptRTbIPZC4KsSwzhQnQyuoNSZr5Q=; b=ljUE9jxl3wE4A5fMjTu6SD3zhwi2L4EbKElYN+qUXnAVlknX62Do/CLQ0Q8NIJK/yD zRgZeRUsbNhXAWvIB2wBjtjb+gNPKsYNgCVr/jS5g8WrFLH/mAHlMFMwe1xKBZuBLWvU GptjKVqgKX0s8V9kXye/Jc5+DVFNh926FIRQk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=AsRDQp2svCyISA4T/bV27n2ELbgbnG3z+DkDJdrWD+OIETUoVYd9fmIWBdMGoZrCXS tzAt6gvN4ehaeQn+zcc0rHZGfh7CMmjm6/IZEkMM/fdJFDdGPdGPNQ6cvTW619I1FFJb rL7CmKe+FOyzDpgzgEsj2g1ieA6y9OZsRfzvk= MIME-Version: 1.0 Received: by 10.229.91.194 with SMTP id o2mr3434636qcm.250.1289683174378; Sat, 13 Nov 2010 13:19:34 -0800 (PST) Received: by 10.229.229.134 with HTTP; Sat, 13 Nov 2010 13:19:34 -0800 (PST) In-Reply-To: <1289506363.30235.113.camel@localhost.localdomain> References: <1289506363.30235.113.camel@localhost.localdomain> Date: Sat, 13 Nov 2010 19:19:34 -0200 Message-ID: From: "Carlos A. M. dos Santos" To: FreeBSD Hackers Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Devin Teske Subject: Re: Spinner Function for Shell Scripts 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: Sat, 13 Nov 2010 21:47:47 -0000 On Thu, Nov 11, 2010 at 6:12 PM, Devin Teske wrote: > Hi fellow hackers... I come with baring gifts! > > So, just as the subject-line says, ... here's an efficient and robust > spinner function compatible with many shells. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0DONE=3D$( /bin/sh -c 'read= -t 0 DONE; echo $DONE' ) Is this expected to be portable to other operating systems? The dash shell, used as /bin/bash in Ubuntu, does not acept the "-t" argument to the read builtin command. Using /bin/bash solves the problem.