Skip to content

Instantly share code, notes, and snippets.

View longdoan7421's full-sized avatar

Long Doan longdoan7421

View GitHub Profile
@longdoan7421
longdoan7421 / example.sh
Created May 26, 2021 14:26 — forked from shakefu/example.sh
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`; }
Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna!
([一-龯])
Regex for matching Hirgana or Katakana
([ぁ-んァ-ン])
Regex for matching Non-Hirgana or Non-Katakana
([^ぁ-んァ-ン])
Regex for matching Hirgana or Katakana or basic punctuation (、。’)