Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: convolutions
- X-seq: zsh-users 20906
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Ray Andrews <rayandrews@xxxxxxxxxxx>
- Subject: Re: convolutions
- Date: Sat, 7 Nov 2015 06:37:15 +0100
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Qr9pcN6JgwsCztvpoyfhVGcNKBfkyFg5EutKwPiS68Y=; b=LNewrgxa4lYejeFno4teEwUheZS9Yxo7SgaYHBwb2L4KPKwuREzVLoBZUTKWuIyd29 eTM9OdWqb9g8LHeXQteWFtQTjor9l90ogNjgHYDK6Ic12oPAA3Chs2VE6EbhLaRK28Ao 8BjIRIGRoajfdelGdzPj2RInoQkfDbmCFFGAh3ZqzQsznVu7x+UFAp88Wy+g96zt6t75 Ohuv+UulCDev6kO3Vb97NIbVtmcoWFAQo0GJUB3+g66YxPAmNtr//vPJyrsmzdN0F335 00gtAJYQuXkng59Y/hpz0qODH4RRCNhcNldkDIz9TRsClGpwXYXGAWHUyI3te81GAVkj GdGw==
- In-reply-to: <563D5ED5.1070102@eastlink.ca>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <563D5ED5.1070102@eastlink.ca>
On Sat, Nov 7, 2015 at 3:15 AM, Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
> Gentlemen:
>
> echo "$(eval echo "\${$(cat in_file)}")" >! out_file
>
> That's the best I've been able to do expanding color variables, eg. " ${red}
> " into their native " \e[31;1m " in a file. It's not a prize winner as far
> as zsh obfuscation goes, still, can it be done more simply? Also, I'd not be
> surprised to learn that there's one of those ancient little utilities that
> already does that:
>
> cat in_file | ancient_utility > outfile
>
> is there?
A smart thing to include when asking for a simpler way to do an
obfuscated thing is what it is you're actually trying to do. Saves
people the effort of trying to deobfuscate your code first. It's also
super unclear what you mean by "expanding $red into native".
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author