瀏覽代碼

formal commit from 10211900416

master
郭夏辉 2 年之前
父節點
當前提交
614fe41b3a
共有 2 個檔案被更改,包括 23 行新增0 行删除
  1. 二進制
      lab1/10211900416/10211900416.pdf
  2. +23
    -0
      lab1/10211900416/10211900416.sh

二進制
lab1/10211900416/10211900416.pdf 查看文件


+ 23
- 0
lab1/10211900416/10211900416.sh 查看文件

@ -0,0 +1,23 @@
#!/bin/bash
chmod +x ./work1.sh #add permisson to execute
rm strings
rm sort_by_ascii
rm sort_by_num
rm summ
rm strings2
for i in `seq 1000`; #50000 lines is too long to wait, choose 1000 lines
do
echo $RANDOM | md5sum | cut -c 1-9 ;
done >> strings
export LC_ALL=C
sort -d strings | uniq -u > sort_by_ascii
sort -n strings | uniq -u > sort_by_num
cat sort_by_ascii >> summ
cat sort_by_num >> summ
for i in `seq 666`; #generate a file randomly
do
echo $RANDOM | md5sum | cut -c 1-9;
done >> strings2
grep -o "com" strings2 | wc -w

Loading…
取消
儲存