1#!/usr/bin/env bash
2
3USER=$(whoami)
4HOST=$(hostname)
5HOSTNAME="$USER@$HOST"
6
7COUNT=0
8BAR="="
9while [[ COUNT -le $((${#HOSTNAME} - 2)) ]];
10do
11 BAR+="="
12 COUNT=$((COUNT+1))
13done
14
15OS=$(cat /etc/*-release | grep PRETTY | cut -d'"' -f2)
16CPU=$(cat /proc/cpuinfo | grep -m 1 model\ name | cut -d':' -f2 | cut -d'@' -f1 )
17RAM=$(eval free -h | awk '/^Mem/ { print $3 "/" $2 }' | sed s/i//g )
18
19ASCII='
20 (\(\ '$HOSTNAME'
21 j". .. '$BAR'
22 ( . .) os '$OS'
23 | ° i cpu '$CPU'
24 ¿ ; memory '$RAM'
25 c?".UJ
26
27'
28
29printf "$ASCII"