dir=/usr/local/nginx/logs for file in $dir/*; do echo $file done
//结果 ./test.sh /usr/local/nginx/logs/access1.log /usr/local/nginx/logs/access.log /usr/local/nginx/logs/error.log /usr/local/nginx/logs/host.access.log /usr/local/nginx/logs/logs /usr/local/nginx/logs/nginx.pid
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/aiops/2314.html