Bash functions for parsing quoted fields