People do this, but it feels a bit weird to start a whole new language interpreter which is much more powerful than the pitiful shell language we use, just to split a field. Why not write your whole program in awk, then? It's likely more efficient anyway.
The canonical shell tool to split fields is cut. Easy to use, simple to read.
For the very common use case to set variables to fields, use the shell built-in read. It uses the same IFS as the rest of the shell.
The canonical shell tool to split fields is cut. Easy to use, simple to read.
For the very common use case to set variables to fields, use the shell built-in read. It uses the same IFS as the rest of the shell.