From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23492 invoked by alias); 7 Nov 2015 17:33:58 -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: 20924 Received: (qmail 28356 invoked from network); 7 Nov 2015 17:33:57 -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,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern_com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=X+80OH45NiCxXC9AAWPiAup63VSo1KrXGxn/8mTiw54=; b=EmfH0f5ybPJpEjioboJAazIP7j4rtCgb7qo6kjxwWoL9mcys0IOjEio6pBIVjBdWQm 11H5D/miwJtIQxbegwvpQ+tbtYb1Yr1xsBSDmj9ys7SQ72yo6/TVJMPh7gOVK1EF1n8L rjOHUDkxYeEDPMb5mLffnMe1csEOvZ7de7kOkT6kJRl6Lv2T83Jmgddk+3Vxyr7WQrw+ RDGZ1A4aPtjmAJM0zdvQP4IRwFycvlJr66o3Sf61qQh5laZKM4bxCC588BCI7hQc4n8n wSaf5HkS4IgbKmOaOhn51FGWzsn4oTsBpptEeSNRQJjY26s7iboSETRp4EIP35OEb8Lj bZ5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=X+80OH45NiCxXC9AAWPiAup63VSo1KrXGxn/8mTiw54=; b=AGHIwZ4rcaIJp5/6RsDwlMxCTQwLOGf4VEbgTcsHseLSVlmRDdByNW8nbx+axctaOp hFrf2LEIke8qxpPv319LAgITxLub8Bu5FDvpqikbOtBviGWlnWDDqFBiTwnvlWD78bWY mqWI56OpVGf7el7/cFdNl7KcO/7rDeKElaRwH3qwihAQ/2nsemdIhTPhtVaH1DIBwIUn JA0pCAuOXPLuMDQG1nV9G9qURTekQc3ByPVHNHFMOcYEEf8fXwVIy5hrioVfSaEMF5/N SZ4Sq7IvyJYIGZMN1miTizpjENwt+K6oVsdh3bjXF4OkSFtcGz0sy4nHTyXbVJdiJM9s oCRw== X-Gm-Message-State: ALoCoQmoi+4eA1fQbPf1Xb6Zo8hNU70afmMc0igEJ68qvmnTBDZBQL6Kv5NYbYY9CHAg7TPrCyov X-Received: by 10.202.176.66 with SMTP id z63mr11597305oie.15.1446917636294; Sat, 07 Nov 2015 09:33:56 -0800 (PST) From: Bart Schaefer Message-Id: <151107093353.ZM24145@torch.brasslantern.com> Date: Sat, 7 Nov 2015 09:33:53 -0800 In-Reply-To: <563E222C.7040508@eastlink.ca> Comments: In reply to Ray Andrews "Re: convolutions" (Nov 7, 8:09am) References: <563D5ED5.1070102@eastlink.ca> <563D9B54.9010604@eastlink.ca> <151107013244.ZM23334@torch.brasslantern.com> <563E222C.7040508@eastlink.ca> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: convolutions MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Nov 7, 8:09am, Ray Andrews wrote: } Subject: Re: convolutions } } $ . ./test: test2 } 12345678-10-345678-20-345678-30-345678-40-345678-50-345678-60-345678-70-345678-80-345678-90-345678-100 } } [ in glorious color: ] } } 10-345678-20-345678-30-345678-40-345678-50-345678-60-345678-70-345678-80-345678-90-345678-100 [...] } working here, tho the first part of my 'measuring string' is cut off for } some reason. "\${$(cat junk1)}" becomes ${12345678-...} which is the syntax for "the 12345678th positional parameter, or if that is not set, then ..." and your expansion "works" entirely by accident but lops off the 12345678 from the front. So your stress test isn't anywhere near as stressful as you thought. } 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 There's no shell operation for "expand parameters but not any of the other kinds of expansions you know about." If what you want is some kind of text replacement, you should be writing in_file in a text processing language (HTML maybe?) rather than in shell syntax.