wc -l

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting wc -l
# 15  
Old 02-20-2008
Thanks Gneen for the correction, hadn't thought about that.


let hline=$((1+($tline/2)))

is what you meant to type. Since adding one to the tline causes the issue to move from odd lines to even lines, and I think what you pointed out was that the line to be split (hline) would have to be 1 more than the true half to get only 2 files.

Again thanks for finding the error in logic.
# 16  
Old 02-20-2008
thanks for the advice guys. unfortunately im not allowed to use SED or AWK to complete this script.
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question