aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2019-03-20 16:30:38 +0100
committerInigoGutierrez <inigogf.95@gmail.com>2019-03-20 16:30:38 +0100
commite700d2c0a4f75ae2875d0586887636fb3308762a (patch)
tree65c835fe9ac551cb93a25a53e4c774a93cacba96
parent040e5f08d217456feebf8039e25e0d3a5fc8803f (diff)
downloadscripts-e700d2c0a4f75ae2875d0586887636fb3308762a.tar.gz
scripts-e700d2c0a4f75ae2875d0586887636fb3308762a.zip
Created lolBanner.sh, to show banners based on a file containing words.
-rwxr-xr-xlolBanner.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/lolBanner.sh b/lolBanner.sh
new file mode 100755
index 0000000..0cc445c
--- /dev/null
+++ b/lolBanner.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# Prints a random banner using figlet and lolcat and choosing a line from ~/.config/.banners
+
+nlines=$(cat $HOME/.config/.banners | wc -l)
+line=$(($(($RANDOM % $nlines)) + 1))
+
+figlet "Code : $(sed "${line}q;d" $HOME/.config/.banners)" | lolcat