bash - How to read rows and columns via awk with special character separator -
can done more in single command?
read line 10 , column 2 file separator ^
cat file | awk 'fnr==10 {print}' | awk -v fs=^ '{print $2}'
if ^
main/common field separator records - it's enough apply following awk expression:
awk -f'^' 'nr==10{ print $2; exit }' file
wiki
Comments
Post a Comment