SyntaxFix
Write A Post
Hire A Developer
Questions
As perl incorporates awk's functionality this can be solved with perl too:
echo " word1 word2" | perl -lane 'print $F[0]'