From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16041 invoked by alias); 7 Nov 2015 16:09:19 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20917 Received: (qmail 11904 invoked from network); 7 Nov 2015 16:09:19 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Authority-Analysis: v=2.1 cv=T/C1EZ6Q c=1 sm=1 tr=0 a=NKvc7L9z7/b0bXwZ1ZmuGA==:117 a=NKvc7L9z7/b0bXwZ1ZmuGA==:17 a=N659UExz7-8A:10 a=3uenc-3qCFwwsSLLKVEA:9 a=pILNOxqGKmIA:10 Message-id: <563E222C.7040508@eastlink.ca> Date: Sat, 07 Nov 2015 08:09:16 -0800 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-version: 1.0 To: zsh-users@zsh.org Subject: Re: convolutions References: <563D5ED5.1070102@eastlink.ca> <563D9B54.9010604@eastlink.ca> <151107013244.ZM23334@torch.brasslantern.com> In-reply-to: <151107013244.ZM23334@torch.brasslantern.com> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit On 11/07/2015 01:32 AM, Bart Schaefer wrote: > That will fail with "bad substitution" for anything more than a single > word in the file "junk1". test2 () { rm junk2 cat junk1 echo "$(eval echo "\${$(cat junk1)}")" >! junk2 echo cat junk2 } $ . ./test: test2 12345678-10-345678-20-345678-30-345678-40-345678-50-345678-60-345678-70-345678-80-345678-90-345678-100 let me not to the marriage${red}of true minds${yellow} admit impediments.${reset} Love is not love which alters${green} when ${reset} [ in glorious color: ] 10-345678-20-345678-30-345678-40-345678-50-345678-60-345678-70-345678-80-345678-90-345678-100 let me not to the marriageof true minds admit impediments. Love is not love which alters when The file is for a deliberate torture test of color handling and tab expansion, so pardon the ugliness, it's the point of it. But it's working here, tho the first part of my 'measuring string' is cut off for some reason. I don't like this, I hate it, it's dangerous. Don't tell me it sux, I know it sux. But I would like some way of performing expansions inside a file without any gottchas. Surely that's simple at least to verbalize: $ cat in_file | expand_all_parameters > out_file