我只是要提取匹配到的字符串,为毛搜出一大推sed操作,要显得各位的牛B技术还是不知道egrep这个功能?一条命令的事。

找出本机所有yarn作业。

$>egrep -o "application_[0-9]*_[0-9]*"  /tmp/t.txt | sort -n | uniq


application_1493848732037_1593432

application_1493848732037_1649494

application_1493848732037_1670246

application_1493848732037_1670447

application_1493848732037_1671083

application_1493848732037_1671121