From owner-freebsd-questions@FreeBSD.ORG Wed Feb 23 07:43:18 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 616F816A4CE for ; Wed, 23 Feb 2005 07:43:18 +0000 (GMT) Received: from av7-1-sn4.m-sp.skanova.net (av7-1-sn4.m-sp.skanova.net [81.228.10.110]) by mx1.FreeBSD.org (Postfix) with ESMTP id 75FCA43D49 for ; Wed, 23 Feb 2005 07:43:17 +0000 (GMT) (envelope-from ertr1013@student.uu.se) Received: by av7-1-sn4.m-sp.skanova.net (Postfix, from userid 502) id 5BD1837E52; Wed, 23 Feb 2005 08:43:16 +0100 (CET) Received: from smtp4-1-sn4.m-sp.skanova.net (smtp4-1-sn4.m-sp.skanova.net [81.228.10.181]) by av7-1-sn4.m-sp.skanova.net (Postfix) with ESMTP id 4BECE37E77 for ; Wed, 23 Feb 2005 08:43:16 +0100 (CET) Received: from falcon.midgard.homeip.net (h201n1fls24o1048.bredband.comhem.se [212.181.162.201]) by smtp4-1-sn4.m-sp.skanova.net (Postfix) with SMTP id 0DC9837E43 for ; Wed, 23 Feb 2005 08:43:15 +0100 (CET) Received: (qmail 566 invoked by uid 1001); 23 Feb 2005 07:43:15 -0000 Date: Wed, 23 Feb 2005 08:43:15 +0100 From: Erik Trulsson To: Christopher Kelley Message-ID: <20050223074314.GA553@falcon.midgard.homeip.net> Mail-Followup-To: Christopher Kelley , freebsd-questions@freebsd.org References: <421C3181.9020004@kelleycows.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <421C3181.9020004@kelleycows.com> User-Agent: Mutt/1.5.6i cc: freebsd-questions@freebsd.org Subject: Re: script "echo on" like MS-DOS? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Feb 2005 07:43:18 -0000 On Tue, Feb 22, 2005 at 11:32:17PM -0800, Christopher Kelley wrote: > Is there a simple way to cause a shell script to echo to the terminal > similar to the old MS-DOS "echo on" command? > > I've tried to read the fine man pages, and even tried looking at for > instance the make scripts that seem to echo their commands to the > terminal, but I couldn't even being to follow them. The answer to that depends entirely on which shell is being used, as it is the shell itself that will have to do the echoing. One solution that seems to work for all of /bin/sh, bash, and zsh is to invoke the shell with the -x flag. Then the shell will echo each command before executing it. For other shells there may, or may not be an equivalent. -- Erik Trulsson ertr1013@student.uu.se