hw
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

23 lines
536 B

#!/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 "de" strings2 | wc -w