我有字符串另存为
test="test1 test2
test3 test4
test5 test6"
和
echo $(shuf -e $test)
它给我的输出和$ test一样,为什么?我期望原始字符串的顺序不同
嗯
$ test="test1 test2
> test3 test4
> test5 test6"
$ echo $test
test1 test2 test3 test4 test5 test6
$ echo $(shuf -e $test)
test4 test5 test2 test6 test1 test3
$ echo $(shuf -e $test)
test5 test2 test4 test3 test6 test1
也许是偶然地为您选择的“随机”排列是身份排列?你尝试了几次吗?
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句