From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21993 invoked from network); 24 Dec 2003 21:11:35 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 24 Dec 2003 21:11:35 -0000 Received: (qmail 13750 invoked by alias); 24 Dec 2003 21:11:16 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6960 Received: (qmail 13680 invoked from network); 24 Dec 2003 21:11:16 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 24 Dec 2003 21:11:16 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.193.203.32] by sunsite.dk (MessageWall 1.0.8) with SMTP; 24 Dec 2003 21:11:16 -0000 Received: from DervishD.pleyades.net (212.Red-80-35-44.pooles.rima-tde.net [80.35.44.212]) by madrid10.amenworld.com (8.10.2/8.10.2) with ESMTP id hBOLBEK03543 for ; Wed, 24 Dec 2003 22:11:14 +0100 Received: from raul@pleyades.net by DervishD.pleyades.net with local (Exim MTA 2.05) id <1AZGH0-00080J-00>; Wed, 24 Dec 2003 22:10:30 +0100 Date: Wed, 24 Dec 2003 22:10:29 +0100 From: DervishD To: Zsh Users Subject: Surely this can be done easier... Message-ID: <20031224211027.GA30731@DervishD> Mail-Followup-To: Zsh Users Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.4i Organization: Pleyades User-Agent: Mutt/1.4i Hi all :)) I have a file containing a list of files, and I want those files in a command line. The problem is that the filenames contain weird characters, spaces and so on. Currently I do the following: $ while read line ; do array=($array "$line") ; done < listing $ command $array I've tried things like 'command $(cat listing)', but obviously they don't work because quoting. Can this be done simpler? I think that I made this same question a time ago, but I haven't found it in the mailing list archive :( Thanks a lot in advance and happy holidays (if any) ;)) Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 http://www.pleyades.net & http://raul.pleyades.net/