get_os.sh 408 字节
Newer Older
F
Frozen 已提交
1 2 3 4 5 6 7 8 9 10 11 12
#!/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---------------------
OS=$(cat /etc/*-release | grep "^NAME=" | cut -d= -f2)
len=$(echo ${#OS})
len=$((len-2))
L
[#971]  
lihui 已提交
13
retval=$(echo -ne ${OS:1:${len}} | cut -d" " -f1)
F
Frozen 已提交
14
echo -ne $retval