为从网页复制的域名列表设置子域名
需求:从网页复制到域名列表,需要设置1.aa.com, 2.aa.com,3.aa.com的子域名。
尝试:可以使用while的条件执行语句来操作,如:
sed 's/ //g' do2.txt | while read -r line; do for chi in $(seq 1 3); do echo -e "$chi.$line"; done done
参考:
- https://unix.stackexchange.com/questions/196780/is-there-an-alternative-to-sed-that-supports-unicode
- http://www.compciv.org/topics/bash/loops/
- https://www.cyberciti.biz/faq/bash-while-loop/
- https://www.tecmint.com/echo-command-in-linux/
- https://juejin.im/entry/586360f3570c3500695501d6
- https://www.playpi.org/2018090601.html
- https://www.cyberciti.biz/faq/unix-howto-read-line-by-line-from-file/