Skip to content

Instantly share code, notes, and snippets.

Avatar
👋

Clayton Miller fremen432

👋
View GitHub Profile
@fremen432
fremen432 / arithmetic.sh
Last active Aug 6, 2022
Arithmetic operations in BASH
View arithmetic.sh
#!/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 Aug 6, 2022
BASH script that prints the current date.
View print-current-date.sh
#!/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 Dec 7, 2021
Tutorial of what regular expressions are and how to use them.
View regex-tutorial.md

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