From 4f395686c18a2e920a03c0bea3e59c851fe866dc Mon Sep 17 00:00:00 2001 From: 10215501433 <10215501433@stu.ecnu.edu.cn> Date: Mon, 12 Sep 2022 21:55:57 +0800 Subject: [PATCH] add 10215501433 lab1 homework --- lab1/10215501433.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lab1/10215501433.sh b/lab1/10215501433.sh index e69de29..31cbb6a 100644 --- a/lab1/10215501433.sh +++ b/lab1/10215501433.sh @@ -0,0 +1,12 @@ +#!/bin/bash +for i in `seq 1000`;do echo $RANDOM | md5sum | cut -c 1-9 ;done >> random1000.txt +#以覆盖写的方式,字母排序,输出unique行 +sort -u random1000.txt > alph +#以覆盖写的方式,数字排序,输出unique行 +sort -u -n random1000.txt > num +#以追加写的方式,字母排序,输出unique行 +sort -u random1000.txt >> alph +#以追加写的方式,数字排序,输出unique行 +sort -u -n random1000.txt >> num +#继续在里面查找coumputer +grep -c "Computer" random1000