From owner-freebsd-questions@FreeBSD.ORG Thu Mar 5 00:17:48 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD8751065678 for ; Thu, 5 Mar 2009 00:17:48 +0000 (UTC) (envelope-from bill@mi.celestial.com) Received: from dorsai-02.celestial.com (dorsai-02.celestial.com [192.136.111.19]) by mx1.freebsd.org (Postfix) with ESMTP id 8734F8FC12 for ; Thu, 5 Mar 2009 00:17:48 +0000 (UTC) (envelope-from bill@mi.celestial.com) Received: from localhost (localhost.localdomain [127.0.0.1]) by dorsai-02.celestial.com (Postfix) with ESMTP id 1AC352072B09 for ; Wed, 4 Mar 2009 16:17:48 -0800 (PST) X-Virus-Scanned: amavisd-new at celestial.com Received: from dorsai-02.celestial.com ([127.0.0.1]) by localhost (dorsai-02.celestial.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id DkfTcBZhvs3V for ; Wed, 4 Mar 2009 16:17:47 -0800 (PST) Received: from ayn.mi.celestial.com (hayek.celestial.com [192.136.111.12]) by dorsai-02.celestial.com (Postfix) with ESMTP id BED422072250 for ; Wed, 4 Mar 2009 16:17:47 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by ayn.mi.celestial.com (Postfix) with ESMTP id 7F60F68BBC5CA; Wed, 4 Mar 2009 16:17:47 -0800 (PST) X-Virus-Scanned: amavisd-new at mi.celestial.com Received: from ayn.mi.celestial.com ([127.0.0.1]) by localhost (ayn.mi.celestial.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id QJjZC1DdlOSY; Wed, 4 Mar 2009 16:17:47 -0800 (PST) Received: by ayn.mi.celestial.com (Postfix, from userid 203) id 61DA868BBC565; Wed, 4 Mar 2009 16:17:47 -0800 (PST) Date: Wed, 4 Mar 2009 16:17:47 -0800 From: Bill Campbell To: freebsd-questions@freebsd.org Message-ID: <20090305001747.GA13774@ayn.mi.celestial.com> Mail-Followup-To: freebsd-questions@freebsd.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 OpenPKG/% (2009-01-05) Subject: Re: the "yes" comand X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd@celestial.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2009 00:17:49 -0000 On Thu, Mar 05, 2009, Vasadi I. Claudiu Florin wrote: > Hell-o, > > Ever wondered about the "yes" command? Well, I have. If one does "yes" > into a terminal one get's an infinit output of "y" on a new line each > time. What's the deal here? The ``yes'' command is designed to automate interactive scripts that expect a repetitive string typed manually (e.g. something like fsck but without the ``-y'' option). One would use something like: yes | somecommand It takes a single string argument so if you had a program that always expected the string ``greblefarf'' one could use: yes greblefarf | yourcommand > I saw the same thing on linux, but you only had to type "y" (those cheap > blokes :P) I don't know what you're talking about here. To the best of my knowledge, the yes command works the same on every version of *nix I have used which goes as far back as Radio Shack Xenix in 1982 (the last real OS that Microsoft was responsible for :-). Bill -- INTERNET: bill@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676 Mercer Island, WA 98040-0820 Fax: (206) 232-9186 The pinnacle of open systems is: when moving from vendor to vendor, the design flaws stay the same.