command 명령어 썸네일형 리스트형 [스크립트] 운영체제 구분 스크립트 운영체제 구분 스크립트 CentOS, Ubuntu 구분하여 스크립트를 적용하기 위함 #!/bin/bash if command -v apt >/dev/null; then echo "install lsb-release on Ubuntu" apt update -qq -y >/dev/null 2>&1 apt install -qq -y lsb-release >/dev/null 2>&1 lsb_release -ds elif command -v yum >/dev/null; then echo "install lsb-release on CentOS" yum install -q -y redhat-lsb-core >/dev/null 2>&1 lsb_release -ds | tr -d '"' else echo "other O.. 더보기 이전 1 다음