You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
635 B

преди 2 години
  1. touch random
  2. for i in {1..50000}
  3. > do echo $RANDOM | md5sum | cut -c 1-9
  4. > done >> random // 生成随机字符串
  5. sort random -o string.txt // 将排完序的内容写入string.txt中
  6. sort random | uniq // 将内容去重输出
  7. sort -n random -o number.txt // 将排完序的内容写入number.txt中
  8. sort -n random | uniq // 将内容去重输出
  9. touch file.txt
  10. cat string.txt > file.txt // 覆盖
  11. cat string.txt >> file.txt // 追加
  12. touch count.txt // 创建文件
  13. vim count.txt // 打开这个文件,并向里写入文字
  14. grep -o "farmer" count.txt // 输出匹配的项
  15. grep -o "farmer" count.txt | wc -l // 统计个数