95 Star 186 Fork 67

kongkong / monitor-http-server

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
stylerc 1.34 KB
Copy Edit Web IDE Raw Blame History
2011-181 authored 2015-03-27 16:16 . add folder
#!/usr/bin/env bash
# DESCRIPTION
# Define some variables and function to help format output
#
# USAGE
# 1. (optionnal) set the path to the stylerc :
# export STYLERC="$HOME/path/to/stylerc"
# 2. include style to your script :
# source "$STYLERC" # include style
_underline_="$(tput sgr 0 1)" # Underline
_bold_="$(tput bold)" # Bold
_reset_="$(tput sgr0)" # Reset
_info_="$(tput setaf 6)" # blue/information
_warning_="$(tput setaf 3)" # yellow/warning
_error_="${_bold_}$(tput setaf 1)" # red/error
_value_="$(tput setaf 7)" # value/white
_valid_="$(tput setaf 2)" # valid/green
# style text as underline
function _underline() {
printf "${_underline_}%s${_reset_}" "$1"
}
# style text as bold
function _bold() {
printf "${_bold_}%s${_reset_}" "$1"
}
# style text as info
function _info() {
printf "${_info_}%s${_reset_}" "$1"
}
# style text as warning
function _warning() {
printf "${_warning_}%s${_reset_}" "$1"
}
# style text as error
function _error() {
printf "${_error_}%s${_reset_}" "$1"
}
# style text as value
function _value() {
printf "${_value_}%s${_reset_}" "$1"
}
# style text as valid
function _valid() {
printf "${_valid_}%s${_reset_}" "$1"
}
_i="$(_info "[i]")"
_w="$(_warning "[×]")"
_e="$(_error "[!]")"

Comment ( 0 )

Sign in for post a comment

Java
1
https://gitee.com/yeetrack/monitor-http-server.git
git@gitee.com:yeetrack/monitor-http-server.git
yeetrack
monitor-http-server
monitor-http-server
master

Search

153430 a91d09cc 1899542 180418 42a90fc8 1899542