From owner-freebsd-questions@FreeBSD.ORG Fri Sep 28 19:03:35 2007 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 24CD116A418 for ; Fri, 28 Sep 2007 19:03:35 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (gizmo.acns.msu.edu [35.8.1.43]) by mx1.freebsd.org (Postfix) with ESMTP id 7D3DE13C45B for ; Fri, 28 Sep 2007 19:03:34 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (localhost [127.0.0.1]) by gizmo.acns.msu.edu (8.13.6/8.13.6) with ESMTP id l8SJ2M1j054902; Fri, 28 Sep 2007 15:02:22 -0400 (EDT) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: (from jerrymc@localhost) by gizmo.acns.msu.edu (8.13.6/8.13.6/Submit) id l8SJ2M8h054901; Fri, 28 Sep 2007 15:02:22 -0400 (EDT) (envelope-from jerrymc) Date: Fri, 28 Sep 2007 15:02:22 -0400 From: Jerry McAllister To: jhall@vandaliamo.net Message-ID: <20070928190222.GA54833@gizmo.acns.msu.edu> References: <21079.67.171.53.31.1191004462.squirrel@admintool.trueband.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <21079.67.171.53.31.1191004462.squirrel@admintool.trueband.net> User-Agent: Mutt/1.4.2.2i Cc: freebsd-questions@freebsd.org Subject: Re: Adding CR/LF 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, 28 Sep 2007 19:03:35 -0000 On Fri, Sep 28, 2007 at 06:34:22PM -0000, jhall@vandaliamo.net wrote: > I know this should be easy, but I cannot get it to work right. Basically, > I have a list of items, and I need to place each one on a separate line. > > Here is the script I am using. > #!/bin/sh > FILENAMES="test1 test2 test3" > FILELIST="" > for filename in ${FILENAMES} > do > FILELIST="${FILELIST}${filename}"$'\n\r' > echo ${FILELIST} > done Are those single quotes the right ones to use there? ////jerry > > And, here is the output I am getting. > test1$\n\r > test1$\n\rtest2$\n\r > test1$\n\rtest2$\n\rtest3$\n\r > > The output I would like to see is: > test1 > test2 > test3 > > Thanks in advance for your assistance. > > > Jay > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >