Created
March 2, 2018 09:35
-
-
Save telatin/9fb0f76663a8e7c4a26a412b39fd11fc to your computer and use it in GitHub Desktop.
Bash intro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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