⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 parsesep.sh

📁 一个awk和bsh混合编程的例子
💻 SH
字号:
#!/bin/kshSEP_CONF="Seperator.cfg";if [ -r $SEP_CONF ];then{	Assemble_start=`awk '{		if ($0 ~ /^ *\t* *#.*/ ){		}		else if ($0 ~/ *\t* *$/){		}		else if ($1 ~/^NESTING_INDICATOR_OPEN/ ){			printf "%s\n",$3		}	}' $SEP_CONF`;	if [ -z "$Assemble_start" ];then		echo "ERROR:NESTING_INDICATOR_OPEN is not defined";		exit 1;	fi		Assemble_end=`awk '{		if ($0 ~ /^ *\t* *#.*/ ){		}		else if ($0 ~/ *\t* *$/){		}		else if ($1 ~/^NESTING_INDICATOR_CLOSE/ ){			printf "%s\n",$3		}	}' $SEP_CONF`;	if [ -z "$Assemble_end" ]; then		echo "ERROR:NESTING_INDICATOR_CLOSE is not defined";		exit 1;	fi		Field_sep=`awk '{		if ($0 ~ /^ *\t* *#.*/ ){		}		else if ($0 ~/ *\t* *$/){		}		else if ($1 ~/^ATTRIBUTE_SEPARATOR_INDICATOR/ ){			printf "%s\n",$3		}	}' $SEP_CONF`;	if [ -z "$Field_sep" ];then		echo "ERROR:ATTRIBUTE_SEPARATOR_INDICATOR is not defined";		exit 1;	fi		Esc_sep=`awk '{		if ($0 ~ /^ *\t* *#.*/ ){		}		else if ($0 ~/ *\t* *$/){		}		else if ($1 ~/^ESCAPE_INDICATOR/ ){			printf "%s\n",$3		}	}' $SEP_CONF`;	if [ -z "$Esc_sep" ]; then		echo "ERROR:ESCAPE_INDICATOR is not defined";		exit 1;	fi}else{	echo "ERROR: $SEP_CONF not exist";	exit 1;}fi

⌨️ 快捷键说明

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