Bash can generate multiple strings from single, if you use {...,...} syntax. Like here:
$ echo pgdb{200,10{0,1}}
pgdb200 pgdb100 pgdb101
Is there any way to take a list of strings and produce (hopefully shorter) string that, upon processing via bash word expansion will produce original list (not necessarily in original order?
For example, I'd like this tool/algorithm, that given:
would produce (for example): {postgres{ql,},m{iata,ysql}}
I thought about using trie to represent input strings, but can't figure out how to process this trie to build output string.
use Compress::BraceExpansion;?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With