π€ Did you ever pipe grep into AWK? π€
> grep x file.txt | awk '{print $1}'
π‘ No need to grep first, AWK can do it:
> awk '/x/{print $1}' file.txt
β‘οΈ Before the command ({..}) is the pattern. The pattern can be a regex (between slashes) and matches on anything in the line