From owner-freebsd-current@FreeBSD.ORG Thu Jul 14 20:46:38 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D16F16A41C for ; Thu, 14 Jul 2005 20:46:38 +0000 (GMT) (envelope-from nj18@nerdshack.com) Received: from karen.nerdshack.com (karen.nerdshack.com [209.189.235.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id BFA8D43D48 for ; Thu, 14 Jul 2005 20:46:37 +0000 (GMT) (envelope-from nj18@nerdshack.com) Received: from dispatchd.nerdshack.com (jean.nerdshack.com [209.189.235.38]) by karen.nerdshack.com (Postfix) with SMTP id 591721E319D for ; Thu, 14 Jul 2005 15:43:39 -0500 (CDT) Received: from 85.95.160.34 (ns.szrt.ru [85.95.160.34]) by mail.nerdshack.com with ESMTP Thu, 14 Jul 2005 15:45:53 -0500 Message-ID: <42D6CF2A.7080704@nerdshack.com> Date: Thu, 14 Jul 2005 16:46:34 -0400 From: nj18 User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050711 X-Accept-Language: en-us, en To: FreeBSD Current Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Strange message: Text file busy X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jul 2005 20:46:38 -0000 Ed Schouten wrote: * nj18 [1] wrote: echo date >somescript chmod +x somescript ./somescript ./somescript: Text file busy. What if you put the following contents in somescript: #!/bin/sh date I guess FreeBSD 4.6 takes /bin/sh as the interpreter by default, but FreeBSD 5 and higher don't. Yours, No, it doesnt work in FreeBSD 5.4: > echo "#\!/bin/sh" >somescript > echo date >>somescript > cat somescript #!/bin/sh date > chmod +x somescript > ./somescript ./somescript: Text file busy. > The strangest thing is that the following works fine on FreeBSD 5.4: > cat >somescript date > chmod +x somescript > ./somescript Thu Jul 14 16:37:53 EDT 2005 > I guess it's a problem about "echo". I am going to compare /usr/src/bin/echo/echo.c in FreeBSD 5.4. and FreeBSD 4.6. References 1. mailto:nj18@nerdshack.com