Skip to content

Instantly share code, notes, and snippets.

@fremen432
Created August 6, 2022 05:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fremen432/3936d1c0fb43b2b457f3c1833f21eaf7 to your computer and use it in GitHub Desktop.
Save fremen432/3936d1c0fb43b2b457f3c1833f21eaf7 to your computer and use it in GitHub Desktop.
BASH script that prints the current date.
#!/bin/bash
Year=`date +%Y`
Month=`date +%m`
Day=`date +%d`
Hour=`date +%H`
Minute=`date +%M`
Second=`date +%S`
echo `date`
echo "Current Date is: $Day-$Month-$Year"
echo "Current Time is: $Hour:$Minute:$Second"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment