OSDN Git Service

Test
authoriga <tosiki@iga-pc3>
Wed, 29 Jan 2014 13:15:56 +0000 (22:15 +0900)
committeriga <tosiki@iga-pc3>
Wed, 29 Jan 2014 13:15:56 +0000 (22:15 +0900)
main/bumsg.fnc [new file with mode: 0644]
template/message.msg [new file with mode: 0644]

diff --git a/main/bumsg.fnc b/main/bumsg.fnc
new file mode 100644 (file)
index 0000000..39dcff9
--- /dev/null
@@ -0,0 +1,17 @@
+function msg() {
+  local msgid=$1
+  local arg1=$2
+  local arg2=$3
+  local arg3=$4
+  local arg4=$5
+  local arg5=$6
+  local arg6=$7
+  local arg7=$8
+  local arg8=$9
+  local msgtextkey='${MSG_'${msgid}'_text}'
+  local msgtextkeyString=`eval "echo ${msgtextkey}"`
+  local printfString='['${msgid}'] '${msgtextkeyString}
+  local outMessage=`printf "${printfString}" ${arg1} ${arg2} ${arg3} ${arg4} ${arg5} ${arg
+6} ${arg7} ${arg8}`
+  echo ${outMessage}
+} 
diff --git a/template/message.msg b/template/message.msg
new file mode 100644 (file)
index 0000000..1e68b36
--- /dev/null
@@ -0,0 +1,5 @@
+MSG_M001_text='Hello [%s] world!'
+MSG_M001_sysout=false
+MSG_M001_syserr=true
+MSG_M001_logger=true
+MSG_M001_level=info