Many of the utilities supplied with macOS are very old versions that haven’t been updated for licensing reasons. You can update some or all of these using brew.
GNU awk will install as gawk
$ brew install gawkformulae: [x]
GNU sed will install as gsed
$ brew install gnu-sedformulae: [x]
GNU tar will install as gtar
$ brew install gnu-tarformulae: [x]
GNU findutils (find, locate, updatedb, xargs)
$ brew install findutilsformulae: [x]
GNU coreutils (base32, cat, cp, head, ls, mv, chown, fmt, pr, sort, tail, tr, wc and many more)
$ brew install coreutilsformulae: [x]
Install the latest bash shell (this will not overwrite the Apple supplied shell):
$ brew install bash
“Refuse to accept the belief that your professional relevance, career success or financial security turns on the next update on the latest technology. Sometimes it's good to put the paddle down and just let the canoe glide” ~ Simon Mainwaring
brew - Package manager.
Syntax for all the GNU utilities can be found under the Linux section.