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.

14 lines
313 B

пре 2 година
  1. #两个字符串文件均由python生成
  2. #按数字排序
  3. #覆盖写
  4. cat hw1.txt | sort | uniq -d > 1.txt
  5. cat hw1.txt | sort -n | uniq -d > 1.txt
  6. #追加写
  7. cat hw1.txt | sort | uniq -d >> 2.txt
  8. cat hw1.txt | sort -n | uniq -d >> 2.txt
  9. #找出指定字符串
  10. grep computer hw1-2.txt
  11. grep -c computer hw1-2.txt