Skip to content

Instantly share code, notes, and snippets.

@telatin
Created March 2, 2018 09:35
Show Gist options
  • Save telatin/9fb0f76663a8e7c4a26a412b39fd11fc to your computer and use it in GitHub Desktop.
Save telatin/9fb0f76663a8e7c4a26a412b39fd11fc to your computer and use it in GitHub Desktop.
Bash intro
#!/bin/bash
# This script prints your city name and the CURRENT date
# We can create a variable CITY
CITY="Norwich"
# The variable DATE will be created with the output of the 'date' command
DATE=$(date +"%Y-%m-%d")
# Finally, we print a string using the variables we declared.
# Note that when accessing their content we need to put a '$' in front of the variable name
echo "$CITY, $DATE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment