?? com.sh
字號:
VERSION=51CREPORT_ID=21CONFIG_FILE_NAME="Rep_$VERSION.cfg";#Attr_Names--attribute names;#Attr_Types--attribute types;#Obj_Deleted--0:object is not deleted;1:object is deletedparseConf(){ Obj_Deleted=`awk -F":" ' BEGIN {deleted=0;} /^ *\t* *#.*/ {;} /^ *\t* *$/ {;} /^[0-9]*/ { if ($1==id ){ if (length($3)==0 ){ deleted=1; } } } END {printf "%d\n",deleted;}' id=$REPORT_ID $CONFIG_FILE_NAME`; if [ $Obj_Deleted -eq 0 ]; then { Attr_Names=`awk -F":" ' BEGIN{attr_ix=0; printf "{"} /^ *\t* *#.*/ {;} /^ *\t* *$/ {;} /^[0-9]*/ { if ($1==id ){ if (attr_ix==0){ printf "%s",$3; } else{ printf ":%s",$3; } attr_ix+=1; } } END {printf "}\n";}' id=$REPORT_ID $CONFIG_FILE_NAME`; } fi}aaa="aaaaaaa";bbb="bbbbbbbb";ccc="cccccccc";ddd=$aaa":"$bbb":"$ccc;echo $ddd;parseConf;echo $Attr_Namesif [ "$Attr_Names"="{}" ];then echo "empty";fi
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -