From owner-freebsd-questions@FreeBSD.ORG Mon May 25 15:57:07 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4E0C106566B for ; Mon, 25 May 2009 15:57:07 +0000 (UTC) (envelope-from unga888@yahoo.com) Received: from web57001.mail.re3.yahoo.com (web57001.mail.re3.yahoo.com [66.196.97.105]) by mx1.freebsd.org (Postfix) with SMTP id 921588FC1D for ; Mon, 25 May 2009 15:57:07 +0000 (UTC) (envelope-from unga888@yahoo.com) Received: (qmail 63217 invoked by uid 60001); 25 May 2009 15:57:06 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1243267026; bh=pfz16/PS60rBONcu8KQ3luNMd8tWxPf0Hisltp/DQ8M=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=2xUM8ThTTy1P+TKFX/241N/pXwgsLCbPXd8OtzRzoSH/25PGY8Nrb2sLHu74LGL6nfktR3PKLVWT8ythex8MjoKdkdbqX/sT0i7/48afCb2KILEqPXCiucN7EIJT7r549NZARHDZzAKVASBA8Np9cI+CI7Wz/0NTas7HPPz6wuE= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=0TxKP7KHwvUqnJoEAxtXh7Np/Nr4nKjcArrY8fFP7NVr90o4zAO3BuIIc4c3QxkpcqekrZRmUVvH/ahuAF9M1pNQfg70t+1fjVKl9srMMt6WR0RNOppSlTM4QZT48scATYEsZAOY8o6U+wvwxLRrctcV5a4FuBZ3JDLqGPSHVZU=; Message-ID: <904563.63141.qm@web57001.mail.re3.yahoo.com> X-YMail-OSG: iMNI_D8VM1l17I6fKL0QTmOWypNAKXT7v.nDTgi0L75whzfxdgyf.KPbl1lV1pVypTu_a7dJJ.Vp4joI61SzZLq0FMIxOSGG7wUqzY.HJg23aCANJWDnv5oXrEwnMDjdQ2oKTJr5iR8UCQYNw66vryzx3Qd2UtSck1vthhCfZHwFwv09YMQKc97uXyoQ6ZibNRuUl.ymwllcJ6Sc9PboSiVhijgIjh_4jjbsaxfX_5vOZwY_J6fkVFHh6JfaKpMFEQDV249nV0ExBgi_g1_qvQ-- Received: from [220.255.7.226] by web57001.mail.re3.yahoo.com via HTTP; Mon, 25 May 2009 08:57:06 PDT X-Mailer: YahooMailClassic/5.3.9 YahooMailWebService/0.7.289.10 Date: Mon, 25 May 2009 08:57:06 -0700 (PDT) From: Unga To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: How to say this in Bash? 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: Mon, 25 May 2009 15:57:08 -0000 --- On Mon, 5/25/09, Jerry wrote: > From: Jerry > Subject: Re: How to say this in Bash? > To: freebsd-questions@freebsd.org > Date: Monday, May 25, 2009, 11:22 PM > On Mon, 25 May 2009 07:36:45 -0700 > (PDT) > Unga > wrote: > > >Here is what happens in bash shell: > >$ echo "${X}" > ${Z} > >bash: ${Z}: ambiguous redirect > > Perhaps I am misinterpreting your question; however, if I > define both > ${X} and ${Z} in a script prior to running your snippet, I > do not > receive any error message. Could you show more info on how > you are > attempting to run this snippet? > $ X=' > XX1=YES > XX2=YES > ' $ echo $X XX1=YES XX2=YES $ $ Y=' > YY1=YES > YY2=YES > ' $ echo $Y YY1=YES YY2=YES $ $ echo "${X}" > ${Z} bash: ${Z}: ambiguous redirect I want to append all variables in X and Y into Z so that "echo $Z" should be: XX1=YES XX2=YES YY1=YES YY2=YES I'm doing everything in command line not using any scripts. Regards Unga