awk 当前离线
上尉
sed -r "/ab.*cd/!d; s/.*ab(.*)cd.*/\1/" a.txt复制代码
TOP
sed "s/cd/@\n/g" a.txt | sed "/ab.*@$/!d; s/.*ab//; s/@$//"复制代码