Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: convolutions



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