Strange message: Text file busy

nj18 nj18 at nerdshack.com
Thu Jul 14 20:46:38 GMT 2005


   Ed Schouten wrote:

* nj18 [1]<nj18 at nerdshack.com> 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 at nerdshack.com


More information about the freebsd-current mailing list