get_version.sh 439 字节
Newer Older
H
hzcheng 已提交
1 2 3 4 5 6 7 8 9
#!/bin/bash
#
# This file is used to install TAOS time-series database on linux systems. The operating system 
# is required to use systemd to manage services at boot

set -e
# set -x

# -----------------------Variables definition---------------------
S
slguan 已提交
10
verinfo=$(cat $1 | grep " version" | cut -d '"' -f2)
H
hzcheng 已提交
11 12 13 14 15
verinfo=$(echo $verinfo | tr "\n" " ")
len=$(echo ${#verinfo})
len=$((len-1))
retval=$(echo -ne ${verinfo:0:${len}})
echo -ne $retval