题1: 请把如下字符串 stu494 e222f stu495 bedf3 stu496 92236 stu497 49b91 转为如下形式: stu494=e222f stu495=bedf3 stu496=92236 stu497=49b91 题2: echo I am oldboy training,请把这个输出中的每个字符去重后排序
题1:
请把如下字符串
stu494
e222f
stu495
bedf3
stu496
92236
stu497
49b91
转为如下形式:
stu494=e222f
stu495=bedf3
stu496=92236
stu497=49b91
题2:
echo I am oldboy training,请把这个输出中的每个字符去重后排序,重复次数多的排到前面。
题3:
已知老男孩12月份将出版新书《跟老男孩学Linux运维:Shell高级编程实战》,下面是第8章的脚本名字,请对脚本名进行排序:
8_10_1.sh 8_1_1.sh 8_13_11.sh 8_2_2.sh 8_4_2.sh 8_6_1.sh 8_7.sh 8_9_2.sh
8_11_1.sh 8_12_1.sh 8_13_12.sh 8_3.sh 8_4_3.sh 8_6_2.sh 8_8.sh 8_11_2.sh 8_1_2.sh 8_2_1.sh 8_4_1.sh 8_4_4.sh 8_6_3.sh 8_9_1.sh
要求排序结果,第一列相同,按第二列排序,第二列相同按第三列排序:
8_1_1.sh
8_1_2.sh
8_2_1.sh
8_2_2.sh
8_3.sh
8_4_1.sh
8_4_2.sh
8_4_3.sh
8_4_4.sh
8_6_1.sh
8_6_2.sh
8_6_3.sh
8_7.sh
8_8.sh
8_9_1.sh
8_9_2.sh
8_10_1.sh
8_11_1.sh
8_11_2.sh
8_12_1.sh
8_13_11.sh
8_13_12.sh
大家练练手啊。
答案见评论: