Skip to content

Instantly share code, notes, and snippets.

@MagePsycho
MagePsycho / mysql-create-db-user.sh
Last active November 5, 2023 05:44
Bash Script: Create MySQL Database & User - https://blog.magepsycho.com/
#!/bin/bash
#
# Script to create MySQL db + user
#
# @author Raj KB <magepsycho@gmail.com>
# @website http://www.magepsycho.com
# @version 0.1.0
################################################################################
@shakefu
shakefu / example.sh
Last active August 30, 2022 01:22
Bash Script with Short and Long Options
# Option defaults
OPT="value"
# getopts string
# This string needs to be updated with the single character options (e.g. -f)
opts="fvo:"
# Gets the command name without path
cmd(){ echo `basename $0`; }