cat 2.txt 18668331562 18668331562 13163033397 #csjdz54188 #13163033397 csjdz54188 #13163033397 csjdz54188 #13163033397 csjdz54188 #13163033397 csjdz54188 #13163033397 csjdz54188 #13163033397 csjdz54188
把开头为 # 的行过滤掉
grep -Ev '^[[:space:]].*|^#' 2.txt 18668331562 18668331562 13163033397 #csjdz54188
sed -e '/^[[:space:]].*/d' 2.txt -e '/^#/d' 18668331562 18668331562 13163033397 #csjdz54188
转载于:https://blog.51cto.com/winterysea/1709825