Bash function to check if it's friday

Posted on 23.11.17   Bash Humor Linux

Ever wondered if today’s Friday? Yeah me too, every day.

Keep yourself updated with this simple function.


1) Open your profile settings file
nano ~/.bashrc

2) Enter the following function in the bottom

yay() {
    day=$(date +%u)
    if [ "$day" == "5" ];
        echo "YAY, IT'S FRIDAY!!!"
        echo "Not to bring you down, but it's not friday yet :("

3) Reload your config file
. ~/.bashrc

4) Try it out! Just type yay in your terminal window whenever you wonder if it’s Friday or not.

More on ITDB

Change Resize Mode for all VMs in RoyalTS 4

How to debug a non starting application with ProcMon

Create a cmd alias/shortcut for issuing commands on remote computer

Finding the source for locked AD account from Event Viewer log on Domain controller

Telnet alternative to check if port is open on host