cut or awk command to print first field of first row
Specify the Line Number using NR
built-in variable.
awk 'NR==1{print $1}' /etc/*release
Specify NR
if you want to capture output from selected rows:
awk 'NR==1{print $1}' /etc/*release
An alternative (ugly) way of achieving the same would be:
awk '{print $1; exit}'
An efficient way of getting the first string from a specific line, say line 42, in the output would be:
awk 'NR==42{print $1; exit}'