Space command dev thenip addr
hostnamectl | grep "Static hostname" | cut -d: -f2 | tr -d '[:space:]'
}
if command -v ip > /dev/null; then
ip addr | awk '/inet/ {print $2}'
get_os_version() {
grep "PRETTY_NAME" /etc/os-release | cut -d= -f2- | tr -d '"' | tr -d '[:space:]'
get_memory_installed() {
free -h | grep "Mem" | awk '{print $2}'
get_printers() {
if lpstat -a 2>/dev/null; then
}
# Parse command line arguments
echo ""
echo "Options:"
echo " -o: Show OS version and name"
echo " -c: Show CPU description"
n)
SHOW_HOSTNAME=true
p)
SHOW_PRINTERS=true
c)
SHOW_CPU_DESCRIPTION=true
d)
SHOW_DISK_SPACE=true
;;
esac
fi
if [ "$SHOW_IP_ADDRESSES" = true ]; then
echo "No IP addresses found." >&2
fi
echo ""
fi
if [ "$SHOW_MEMORY_INSTALLED" = true ]; then
echo "Memory Installed: $(get_memory_installed)"
echo "$(get_disk_space)"
echo ""
echo ""
fi