rfc2my.sh

来自「unix/linux下的路由守护程序」· Shell 代码 · 共 59 行

SH
59
字号
: run this script through /bin/sh##	$Id: rfc2my.sh,v 1.3 1998/09/15 16:48:32 wfs Exp $#cat $* | awk 'BEGIN	{	    prefix = "";	    started = 0;	}/MIB [ ]*DEFINITIONS[ ]*::=[ ]*BEGIN/ {	    prefix = "";	}/SMI [ ]*DEFINITIONS[ ]*::=[ ]*BEGIN/ {	    prefix = "";	}/DEFINITIONS[ ]*::=[ ]*BEGIN/ {	    if (length(prefix) > 0) {		print prefix;		prefix = "";	    }	    started = 1;	}/MIB/ && !/--.*MIB/ {	    if (!started) {		prefix = $0;		next;	    }	}/\[Page [1-9][0-9]*\]?$/ {	    eating = 1;	    next;	}//	{	    if (eating)		next;	}/^[ ]*$/ {	    if (eating)		next;	}	{	    if (eating)		eating = 0;	    else		if (started)		    print $0;		else		    if (length(prefix) > 0)			prefix = prefix "\n" $0;	}/END$/	{	    if (started)		exit(0);	}'exit

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?