[英]why doesn't it execute text file?
#!/bin/bash
touch network_detials.txt
while true; do
ifconfig -a | cat >> network_detials.txt
done
Not executing properly or creating.txt file from TOUCH creation未正确执行或从 TOUCH 创建中创建 .txt 文件
cat
usually doesn't change or help anything.通过cat
管道通常不会改变或帮助任何事情。touch
ing the file may seem nice, but it is also superfulous since >>
will create the file if needed. touch
文件可能看起来不错,但它也是多余的,因为>>
将在需要时创建文件。while
loop.请在while
循环内缩进。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.