Linux uses awk command to obtain a row or a column

1. Get the first line

awk 'NR==1'

2. Get the first column

awk '{print $1}' 

 

Published 139 original articles · won praise 13 · views 9284

Guess you like

Origin blog.csdn.net/qq_18671415/article/details/104446887