Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,我有如下文件示例。使用 perl 我需要从功能 A - 功能 B grep 行
FeatureA:Y Suporrted devices : : : :Suported device FeatureB:Y Suporrted devices : : : :Suported device FeatureC:Y :
perl -ne'print if /^FeatureA:/ .. /^FeatureB:/'
...再一次,你可能只想要排到FeatureB 线,所以
perl -ne'print if ( /^FeatureA:/ .. /^FeatureB:/ ) =~ /^\d+\z/;'