From owner-freebsd-questions@FreeBSD.ORG Sat Sep 10 00:42:33 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 0EB3916A41F for ; Sat, 10 Sep 2005 00:42:33 +0000 (GMT) (envelope-from njt@ayvali.org) Received: from sanddollar.geekisp.com (sanddollar.geekisp.com [204.89.131.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6926743D49 for ; Sat, 10 Sep 2005 00:42:32 +0000 (GMT) (envelope-from njt@ayvali.org) Received: (qmail 25769 invoked by uid 1003); 10 Sep 2005 00:42:31 -0000 Received: from clam.int.geekisp.com (HELO clam.geekisp.com) (192.168.4.38) by mail.geekisp.com with (DHE-RSA-AES256-SHA encrypted) SMTP; 10 Sep 2005 00:42:31 -0000 Received: from clam.geekisp.com (njt@localhost.geekisp.com [127.0.0.1]) by clam.geekisp.com (8.13.3/8.12.11) with ESMTP id j8A0gVL0001650; Fri, 9 Sep 2005 20:42:31 -0400 (EDT) Received: (from njt@localhost) by clam.geekisp.com (8.13.3/8.13.3/Submit) id j8A0gUVV010412; Fri, 9 Sep 2005 20:42:30 -0400 (EDT) X-Authentication-Warning: clam.geekisp.com: njt set sender to njt@ayvali.org using -f Date: Fri, 9 Sep 2005 20:42:30 -0400 From: "N.J. Thomas" To: bob self Message-ID: <20050910004230.GD15735@ayvali.org> References: <4321DC05.3050509@charter.net> <20050909212305.GC15735@ayvali.org> <43220F9F.9050002@charter.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43220F9F.9050002@charter.net> User-Agent: Mutt/1.5.9i 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: Sat, 10 Sep 2005 00:42:33 -0000 * bob self [2005-09-09 18:41:35 -0400]: > 0000000: 2321 2f62 696e 2f73 680d 0a65 6368 6f20 #!/bin/sh..echo ^^ > 0000010: 2270 696e 6769 6e67 2e2e 2e2e 220d 0a "pinging....".. Yup, that's your problem. This file is a DOS text file, so its end of line is a (0x0d 0x0a) instead of just (0x0a). Normally, that doesn't matter because most Unix utilities are multi-eol-format aware, but you can't have it in the shebang line because the OS interprets the extra carriage as part of the command, so it is looking for /bin/sh^M, which doesn't exist. Use a utility like dos2unix or some a decent text editor to convert this to a Unix file format and you'll be good to go. Thomas -- N.J. Thomas njt@ayvali.org Etiamsi occiderit me, in ipso sperabo