how to get the mid point (middle line ) of file, provided the length of file unknown
I am able to get the length of file but not able to get the mid(middle) line of file in the same command.
>>tt=`wc -l resume.doc | cut -f1 -d ' '`;
I have tried this
>>tt=`wc -l temp.txt | cut -f1 -d ' '`;sed -n "`expr $tt / 2 - 4`,`expr $tt / 2` p" temp.txt
can we have better solution?
|All times are GMT -5. The time now is 01:08 PM.|