Skip to content

Instantly share code, notes, and snippets.

View fremen432's full-sized avatar
👋

Clayton Miller fremen432

👋
View GitHub Profile
@fremen432
fremen432 / arithmetic.sh
Last active August 6, 2022 05:58
Arithmetic operations in BASH
#!/bin/bash
echo "Enter your first number"
read x
echo "Enter your second number"
read y
(( prod=x*y )) # Multiplication
(( quot=x/y )) # Division
@fremen432
fremen432 / print-current-date.sh
Created August 6, 2022 05:25
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"
@fremen432
fremen432 / regex-tutorial.md
Last active December 7, 2021 09:31
Tutorial of what regular expressions are and how to use them.

Regular Expression Tutorial

This tutorial is meant to be a foundational reference guide for anyone learning regular expressions. We'll be referencing one specific regex throughout this tutorial that can be used to search for an email address such as "bob@gmail.com" and return a match if the structure of that email matches the criteria specified in the regex. We'll break down each component of our email regex and learning about the functionality of each part. By the end of this tutorial you will know what a regular expression is, when to use them and how to utilize each component.

Bonus: You can click here to navigate to an online regex editor so you can practice your regex scripting as you learn!

Summary