From owner-freebsd-questions@FreeBSD.ORG Fri Jan 26 17:34:41 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 922DE16A400 for ; Fri, 26 Jan 2007 17:34:41 +0000 (UTC) (envelope-from dghatikachalam@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.231]) by mx1.freebsd.org (Postfix) with ESMTP id 56FFA13C483 for ; Fri, 26 Jan 2007 17:34:41 +0000 (UTC) (envelope-from dghatikachalam@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so848060wxc for ; Fri, 26 Jan 2007 09:34:41 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=qlp4sc/sFcvUfoIghd3e1Zvz3QOhUbHOJNllka16wuUmcSxnQeqndwOfFBB/B/og9mEtC6A6tVbddiaV8S2zeErqkRNl/aBLjUKt14tQJtibxrCNLo51OVMYGRqWQ8FxFjq6iKhFPtCY/F84hpkUoWqg/tfBdH1oEuV/wMy/YmY= Received: by 10.70.80.6 with SMTP id d6mr6510638wxb.1169832880866; Fri, 26 Jan 2007 09:34:40 -0800 (PST) Received: by 10.70.52.12 with HTTP; Fri, 26 Jan 2007 09:34:40 -0800 (PST) Message-ID: Date: Fri, 26 Jan 2007 12:34:40 -0500 From: "Dak Ghatikachalam" To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: OT: Function not recognized while calling a function from awk 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, 26 Jan 2007 17:34:41 -0000 Dear Freebsd I have something strange problem happening any input would be great for some reason the Korn shell is not detecting the function that I am calling from awk Actual code excerpt is function dogdied { echo "Why the hell did you die in $1" } export dogdied RESTORE_LOCATION="/u03/oradata,/u01/app/oracle/oradata/,/u02/oradata" echo $RESTORE_LOCATION | awk -F, '{ for (i=1; i<=NF ;i++) { system ("dogdied $i") print $i } } ' ------------ Output looks like below ------------------------- oracle@isengardfunction dogdied > { > echo "Why the hell did you die in $1" > } oracle@isengard oracle@isengardexport dogdied oracle@isengard oracle@isengard/oradata/,/u02/oradata" < oracle@isengard oracle@isengardecho $RESTORE_LOCATION | > awk -F, '{ > for (i=1; i<=NF ;i++) > { system ("dogdied $i") > print $i > } > } > ' sh: line 1: dogdied: command not found /u03/oradata sh: line 1: dogdied: command not found /u01/app/oracle/oradata/ sh: line 1: dogdied: command not found /u02/oradata oracle@isengard Any idea Thanks Dak