Skip to content

Instantly share code, notes, and snippets.

@lgaggini
Created June 12, 2015 17:02
Show Gist options
  • Save lgaggini/e9eba7855e5b3f4f1681 to your computer and use it in GitHub Desktop.
Save lgaggini/e9eba7855e5b3f4f1681 to your computer and use it in GitHub Desktop.
Shell script to generate a motd with some system infos and goodies
#!/bin/sh
#---------------------------
#-- dynamic_motd --
#-- by lgaggini --
#-- CC BY-SA 3.0 --
#---------------------------
echo -e "
db d888b .d8b. d888b d888b d888888b d8b db d888888b
88 88' Y8b d8' 8b 88' Y8b 88' Y8b 88' 888o 88 88'
88 88 88ooo88 88 88 88 88V8o 88 88
88 88 ooo 88~~~88 88 ooo 88 ooo 88 88 V8o88 88
88booo. 88. ~8~ 88 88 88. ~8~ 88. ~8~ .88. 88 V888 .88.
Y88888P Y888P YP YP Y888P Y888P Y888888P VP V8P Y888888P
%+++++++++++++++++++++ SYSTEM INFO +++++++++++++++++++++%
CPU: `cat /proc/cpuinfo | grep 'model name' | head -1 | cut -d':' -f2`
RAM: `free -m | head -n 2 | tail -n 1 | awk {'print $2'}`MB
OS: `uname -srmo` - `lsb_release -s -d`
%++++++++++++++++++++ SYSTEM STATUS ++++++++++++++++++++%
System load: `uptime`
Used memory: `free -m | head -n 3 | tail -n 1 | awk {'print $3'}`MB
`df -h`
%++++++++++++++++++++ SYSTEM MESSAGE +++++++++++++++++++%
Enjoy your hack free as in freedom!
"
@lgaggini
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment