Skip to content

Instantly share code, notes, and snippets.

@at1as
Created July 4, 2016 03:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save at1as/8001417a40e3511fea95f82cacbbc2cc to your computer and use it in GitHub Desktop.
Save at1as/8001417a40e3511fea95f82cacbbc2cc to your computer and use it in GitHub Desktop.
Add oxford comma to script
jason$ echo "a, b, c and d. e, f, g, and h" | sed 's/\([^,]\)\(\ and\)/\1\,\2/g'
> a, b, c, and d. e, f, g, and h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment