root in jCeXjfniZtN in /
➜ mkdir test10
root in jCeXjfniZtN in /
➜ cd test10/
root in jCeXjfniZtN in /test10
➜ vim test.sh
root in jCeXjfniZtN in /test10 took 5s
➜ cat test.sh
#!/bin/bash
for ((i=1; i<11; i++));
do
touch test$i.txt
done
for file in test1.txt test2.txt test3.txt test4.txt test5.txt test6.txt test7.txt test8.txt test9.txt test10.txt
do
echo -e "11 22\n11 22\n11 22\n11 22\n11 22\n11 22\n11 22\n11 22\n11 22\n11 22" >> $file
done
root in jCeXjfniZtN in /test10
➜ ll
total 4
-rw-r--r-- 1 root root 304 Dec 9 14:40 test.sh
root in jCeXjfniZtN in /test10
➜ sh test.sh
root in jCeXjfniZtN in /test10
➜ ll
total 44
-rw-r--r-- 1 root root 60 Dec 9 14:40 test10.txt
-rw-r--r-- 1 root root 60 Dec 9 14:40 test1.txt
-rw-r--r-- 1 root root 60 Dec 9 14:40 test2.txt
-rw-r--r-- 1 root root 60 Dec 9 14:40 test3.txt
-rw-r--r-- 1 root root 60 Dec 9 14:40 test4.txt
-rw-r--r-- 1 root root 60 Dec 9 14:40 test5.txt
-rw-r--r-- 1 root root 60 Dec 9 14:40 test6.txt
-rw-r--r-- 1 root root 60 Dec 9 14:40 test7.txt
-rw-r--r-- 1 root root 60 Dec 9 14:40 test8.txt
-rw-r--r-- 1 root root 60 Dec 9 14:40 test9.txt
-rw-r--r-- 1 root root 304 Dec 9 14:40 test.sh
root in jCeXjfniZtN in /test10
➜ cat test10.txt
11 22
11 22
11 22
11 22
11 22
11 22
11 22
11 22
11 22
11 22
root in jCeXjfniZtN in /test10
➜