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

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -