From owner-freebsd-questions@FreeBSD.ORG Fri Feb 3 20:14:19 2006 Return-Path: X-Original-To: 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 1791A16A420 for ; Fri, 3 Feb 2006 20:14:19 +0000 (GMT) (envelope-from parv@pair.com) Received: from mta11.adelphia.net (mta11.adelphia.net [68.168.78.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B45143D48 for ; Fri, 3 Feb 2006 20:14:18 +0000 (GMT) (envelope-from parv@pair.com) Received: from default.chvlva.adelphia.net ([68.67.248.200]) by mta11.adelphia.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20060203201417.LXGZ7811.mta11.adelphia.net@default.chvlva.adelphia.net>; Fri, 3 Feb 2006 15:14:17 -0500 Received: by default.chvlva.adelphia.net (Postfix, from userid 1000) id 8274AB677; Fri, 3 Feb 2006 15:14:16 -0500 (EST) Date: Fri, 3 Feb 2006 15:14:15 -0500 From: Parv To: Kristian Vaaf Message-ID: <20060203201415.GA3554@holestein.holy.cow> Mail-Followup-To: Kristian Vaaf , questions@freebsd.org References: <7.0.1.0.2.20060203110425.01744328@broadpark.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7.0.1.0.2.20060203110425.01744328@broadpark.no> Cc: questions@freebsd.org Subject: Re: Script to generate names 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, 03 Feb 2006 20:14:19 -0000 in message <7.0.1.0.2.20060203110425.01744328@broadpark.no>, wrote Kristian Vaaf thusly... > > I'm looking for pointers on how to make a simple shell script that > will generate new names based on words (one word per line) from > two different files, and output these to a third file. ... > The first file will be a list of custom words. The second file > will be /usr/local/share/dict/words. > > If the first word in the custom list is "apathy" and the first word in the > dictionary file is "alien", it will generate: > > apathyalien > alienapathy > > To a third file. And then continue with the rest of the words ... > > A friend told me I could do something like this: ( reformatted for loop) > for i in $( do echo -n $i > done \ That will put all the words, from both list[12], in one long line, on standard out. > && echo >> list 3 At the end of the loop, you put a new lines in file "list" , not "list3" (which i assume is only a typo). Mind you nothing else (namely the for loop output) goes in list3. I do not have a solution yet, will post later if nobody else posts (a working) one. - Parv --