#!/bin/sh # Displays basic information about the system # shellcheck disable=SC2048,SC2086 . /etc/os-release bopt="-c" opt="-br" all="" plain="" TTY=$(resize) eval "$TTY" # COLUMS and ROWS should be set on the console, if not, use fallback if [ -z "$COLUMNS" ]; then if command -v tput; then COLUMNS=$(tput cols) else COLUMNS=80 fi fi h1() { STR="$*" if [ -n "$plain" ]; then echo "$STR" | tr '[:lower:]' '[:upper:]' else printf "\033[7m%-${COLUMNS}s\033[0m\n" "$STR" fi } h2() { STR="$*" if [ -n "$plain" ]; then echo "$STR" echo "$STR" | sed 's/./-/g' else printf "\033[1m%-${COLUMNS}s\033[0m\n" "$STR" fi } dm() { if [ -n "$plain" ]; then echo "${*}" else printf "\033[2m%s\033[0m\n" "$*" fi } ul() { if [ -n "$plain" ]; then printf "__%s__" "$*" else printf "\033[4%s\033[0m" "$*" fi } em() { if [ -n "$plain" ]; then printf "**%s**" "$*" else printf "\033[5m%s\033[0m" "$*" fi } usage() { cat <