cat elasticsearch.yml | grep "^\s*[^# \t].*$" cat elasticsearch.yml | grep -v ^# |grep -v ^$ 转载于:https://www.cnblogs.com/LouisZJ/p/8962277.html