From 462cd19f46267d4e8ddc3deb89c736d966db04cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E5=87=AF=E6=81=92?= <2980811196@qq.com> Date: Sun, 11 Sep 2022 10:49:45 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=87=B3=20'lab1'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lab1/10215501406.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lab1/10215501406.txt diff --git a/lab1/10215501406.txt b/lab1/10215501406.txt new file mode 100644 index 0000000..46c91b3 --- /dev/null +++ b/lab1/10215501406.txt @@ -0,0 +1,13 @@ +#1 +for i in `seq 50000`;do echo $RANDOM | md5sum | cut -c 1-9 ;done > 1.txt +sort -d 1.txt | uniq +sort -n 1.txt | uniq +sort -d 1.txt | uniq > 1_uniq1.txt +sort -n 1.txt | uniq > 1_uniq1.txt +sort -d 1.txt | uniq >> 1_uniq2.txt +sort -n 1.txt | uniq >> 1_uniq2.txt + +#2 +for i in `seq 50000`;do echo $RANDOM | md5sum | cut -c 1-9 ;done > 2.txt +grep 'computer' 2.txt +grep -o 'computer' 2.txt | wc -l \ No newline at end of file From 2e03e33cc0956d1f9e36ddcaeadc74623da8cae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E5=87=AF=E6=81=92?= <2980811196@qq.com> Date: Sun, 11 Sep 2022 11:08:00 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'lab1/10215501406.txt'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lab1/10215501406.txt | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lab1/10215501406.txt b/lab1/10215501406.txt index 46c91b3..a50d518 100644 --- a/lab1/10215501406.txt +++ b/lab1/10215501406.txt @@ -1,13 +1,13 @@ -#1 -for i in `seq 50000`;do echo $RANDOM | md5sum | cut -c 1-9 ;done > 1.txt -sort -d 1.txt | uniq -sort -n 1.txt | uniq -sort -d 1.txt | uniq > 1_uniq1.txt -sort -n 1.txt | uniq > 1_uniq1.txt -sort -d 1.txt | uniq >> 1_uniq2.txt -sort -n 1.txt | uniq >> 1_uniq2.txt - -#2 -for i in `seq 50000`;do echo $RANDOM | md5sum | cut -c 1-9 ;done > 2.txt -grep 'computer' 2.txt +#1 +for i in `seq 50000`;do echo $RANDOM | md5sum | cut -c 1-9 ;done > 1.txt +sort -d 1.txt | uniq +sort -n 1.txt | uniq +sort -d 1.txt | uniq > 1_uniq_by_asc.txt +sort -n 1.txt | uniq > 1_uniq_by_num.txt +cat 1_uniq_by_asc.txt | uniq >> 1_uniq_total.txt +cat 1_uniq_by_num.txt | uniq >> 1_uniq_total.txt + +#2 +for i in `seq 50000`;do echo $RANDOM | md5sum | cut -c 1-9 ;done > 2.txt +grep 'computer' 2.txt grep -o 'computer' 2.txt | wc -l \ No newline at end of file From bb262b3db4a1a9e7de88ab6affc5916a456447d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E5=87=AF=E6=81=92?= <2980811196@qq.com> Date: Sun, 11 Sep 2022 11:17:22 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=87=B3=20'lab1'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lab1/10215501406.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lab1/10215501406.sh diff --git a/lab1/10215501406.sh b/lab1/10215501406.sh new file mode 100644 index 0000000..a50d518 --- /dev/null +++ b/lab1/10215501406.sh @@ -0,0 +1,13 @@ +#1 +for i in `seq 50000`;do echo $RANDOM | md5sum | cut -c 1-9 ;done > 1.txt +sort -d 1.txt | uniq +sort -n 1.txt | uniq +sort -d 1.txt | uniq > 1_uniq_by_asc.txt +sort -n 1.txt | uniq > 1_uniq_by_num.txt +cat 1_uniq_by_asc.txt | uniq >> 1_uniq_total.txt +cat 1_uniq_by_num.txt | uniq >> 1_uniq_total.txt + +#2 +for i in `seq 50000`;do echo $RANDOM | md5sum | cut -c 1-9 ;done > 2.txt +grep 'computer' 2.txt +grep -o 'computer' 2.txt | wc -l \ No newline at end of file