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.

23 lines
536 B

преди 2 години
  1. #!/bin/bash
  2. chmod +x ./work1.sh #add permisson to execute
  3. rm strings
  4. rm sort_by_ascii
  5. rm sort_by_num
  6. rm summ
  7. rm strings2
  8. for i in `seq 1000`; #50000 lines is too long to wait, choose 1000 lines
  9. do
  10. echo $RANDOM | md5sum | cut -c 1-9 ;
  11. done >> strings
  12. export LC_ALL=C
  13. sort -d strings | uniq -u > sort_by_ascii
  14. sort -n strings | uniq -u > sort_by_num
  15. cat sort_by_ascii >> summ
  16. cat sort_by_num >> summ
  17. for i in `seq 666`; #generate a file randomly
  18. do
  19. echo $RANDOM | md5sum | cut -c 1-9;
  20. done >> strings2
  21. grep -o "de" strings2 | wc -w