From 603eed911d0426d5d30f1021505b7f16a62020b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E4=B8=80=E7=8F=85?= <1753710808@qq.com> Date: Sat, 10 Sep 2022 22:01:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E8=87=B3?= =?UTF-8?q?=20'lab1'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lab1/hw1.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 lab1/hw1.sh diff --git a/lab1/hw1.sh b/lab1/hw1.sh new file mode 100644 index 0000000..709c1e9 --- /dev/null +++ b/lab1/hw1.sh @@ -0,0 +1,11 @@ +sort data.txt | uniq -u +sort -n data.txt | uniq -u +sort data.txt > data2 +sort -n data.txt > data3 +sort data.txt >> data2 +sort -n data.txt >> data3 + +grep ABC data.txt +grep -o ABC data.txt +grep ABC data.txt | wc -l +grep -o ABC data.txt | wc \ No newline at end of file