I want to display at a specific line, e.g. line 4, from a text file in Terminal (I need this for character counts, using wc
). I'm sure this is a simple problem but read -e 1 filename
doesn't do it.
What can be used to accomplish this task?
command lineterminal
I want to display at a specific line, e.g. line 4, from a text file in Terminal (I need this for character counts, using wc
). I'm sure this is a simple problem but read -e 1 filename
doesn't do it.
What can be used to accomplish this task?
Best Answer
You can use
sed
command:Or
head
/tail
combination: