Update functions

Bash oneliners (untested)
Merge pull request #14 from CurlyMoo/patch-9

Replace "echo | cut" with Bash one-liners.