[root@pcnet test]# cat filename
dir1
dir2
dir3 34
[root@pcnet test]# while read line; do mkdir "${line}";done < filename
[root@pcnet test]# ll
total 20
drwxr-xr-x. 2 root root 4096 Jun 17 17:12 dir1
drwxr-xr-x. 2 root root 4096 Jun 17 17:12 dir2
drwxr-xr-x. 2 root root 4096 Jun 17 17:12 dir3 34
-rw-r--r--. 1 root root 18 Jun 17 17:11 filename
-rw-r--r--. 1 root root 70 Jun 17 11:10 test.sh
![](https://img2024.cnblogs.com/blog/35695/202403/35695-20240328092537879-1189167464.jpg)