Bash 单词混洗和与第二个字符串的比较

Bash 单词混洗和与第二个字符串的比较,bash,Bash,随机洗牌一个单词,并与另一个输入字符串进行比较,如果找到匹配项,则返回布尔值。如何使用bashshell脚本实现 比如说, Word "cat" ,shuffle like "cta","atc" and so on ... second input string suppose "tac" in case if matches with any of the random shuffle string return in boolean .Like an anagram. 在此处查看您所需的

随机洗牌一个单词,并与另一个输入字符串进行比较,如果找到匹配项,则返回布尔值。如何使用bashshell脚本实现

比如说,

Word "cat" ,shuffle like "cta","atc" and so on ... second input string suppose "tac" in case if matches with any of the random shuffle string return in boolean .Like an anagram.

在此处查看您所需的要求


您需要提供更多详细信息。举个例子怎么样?非常感谢。“猫”这个词,像“cta”,“atc”这样的洗牌。。。第二个输入字符串假设为“tac”,如果与任意随机洗牌字符串返回的布尔值匹配。您的意思是要查找输入字1是否是输入字2的一个字谜吗?如果字1是第二个字谜的一个字谜,则为“是”