Tuesday, October 27, 2015

Read nth line from a text file using sed

To read a particular line (eg 10-th line) from a text file and split by delimiter into an array
Array=(`sed -n "10{p;q;}" file.txt`)

No comments: