From owner-freebsd-questions@FreeBSD.ORG Fri Sep 9 22:41:45 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 08DBE16A41F for ; Fri, 9 Sep 2005 22:41:45 +0000 (GMT) (envelope-from bobself@charter.net) Received: from mxsf20.cluster1.charter.net (mxsf20.cluster1.charter.net [209.225.28.220]) by mx1.FreeBSD.org (Postfix) with ESMTP id 93A9C43D48 for ; Fri, 9 Sep 2005 22:41:44 +0000 (GMT) (envelope-from bobself@charter.net) Received: from mxip02a.cluster1.charter.net (mxip02a.cluster1.charter.net [209.225.28.132]) by mxsf20.cluster1.charter.net (8.12.11/8.12.11) with ESMTP id j89Mfgu4031715 for ; Fri, 9 Sep 2005 18:41:43 -0400 Received: from 24-177-225-234.dhcp.spbg.sc.charter.com (HELO [127.0.0.1]) ([24.177.225.234]) by mxip02a.cluster1.charter.net with ESMTP; 09 Sep 2005 18:41:41 -0400 X-IronPort-AV: i="3.97,95,1125892800"; d="scan'208"; a="1358941158:sNHT14350936" Message-ID: <43220F9F.9050002@charter.net> Date: Fri, 09 Sep 2005 18:41:35 -0400 From: bob self User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "N.J. Thomas" References: <4321DC05.3050509@charter.net> <20050909212305.GC15735@ayvali.org> In-Reply-To: <20050909212305.GC15735@ayvali.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Can't execute a script X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2005 22:41:45 -0000 N.J. Thomas wrote: >I've seen something like this happen when there is a non-printing >character on the shebang line (like a CTRL-G or similar). So instead of >running /bin/sh, your shell tries to run "/bin/sh^G" -- which obviously >doesn't exist. > >Can you run "xxd /root/bin/scripttest" and show us the output? If you >don't have xxd on your system (it usually is packaged with Vim) you can >try "od -x /root/bin/scripttest". > >xxd/od will show right away if there is anything funky on the shebang >line that shouldn't be there. > >thanks, >Thomas > > > xxd scripttest: 0000000: 2321 2f62 696e 2f73 680d 0a65 6368 6f20 #!/bin/sh..echo 0000010: 2270 696e 6769 6e67 2e2e 2e2e 220d 0a "pinging...."..