From owner-freebsd-questions Sat Feb 23 21:44:36 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mired.org (dsl-64-192-6-133.telocity.com [64.192.6.133]) by hub.freebsd.org (Postfix) with SMTP id 8D83837B405 for ; Sat, 23 Feb 2002 21:44:30 -0800 (PST) Received: (qmail 79196 invoked by uid 100); 24 Feb 2002 05:44:13 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15480.32172.698420.377699@guru.mired.org> Date: Sat, 23 Feb 2002 23:44:12 -0600 To: "Jeff Jeter" Cc: questions@freebsd.org Subject: Re: Linux shell scripts In-Reply-To: <21963861@toto.iv> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ From: "Mike Meyer" X-Delivery-Agent: TMDA/0.46 (Python 2.2; freebsd-4.5-STABLE-i386) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Jeff Jeter types: > This is a multi-part message in MIME format. > > ------=_NextPart_000_0009_01C1BCA7.2FF0E000 > Content-Type: text/plain; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable First, since no one asked you yet, *please* adjust your mailer to just send one plain text copy of your mail. That will make your mail more readable to others, and more likely to be answered. > I have several apps that use shell schripts. THese apps are designed = > for linux. when i run these scripts with sh i get odd errors such as = > Syntax error: unexpected ")" and=20 > function: not found > Syntax error: unexpected "}".=20 As others have pointed out, you're using the wrong shell. Make sure you've got the bash2 port installed, and change the first line of all the scripts from "#!/bin/sh" to "#!/usr/local/bin/bash" so it runs bash. Also set SHELL in the environment to /usr/local/bin/bash if it doesn't already have that value. The other problem looks like the scripts are expecting things that aren't part of FreeBSD. You might try running them under with the linux compatabililty software installed, but I doubt that that will help: linux distros are a varied lot. I notice you posted the script once, but the digestifier eating MIME headers makes it hard for me to decipher. You might be better off asking us what applications exist to do whatever those scripts do - or whatever the application they are installing does. http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message