{"id":3750,"date":"2021-11-04T21:50:46","date_gmt":"2021-11-04T21:50:46","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=3750"},"modified":"2021-11-04T21:51:14","modified_gmt":"2021-11-04T21:51:14","slug":"for-loop-to-read-blank-lines-from-file","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/for-loop-to-read-blank-lines-from-file\/20635.html","title":{"rendered":"FOR Loop To Read BLANK LINES From File"},"content":{"rendered":"<p>Hello all,<br \/>\nI tried to search everywhere but failed to get answer. I would like to read a text file using FOR loop in batch script, but it ignores BLANK LINES. I would like to count\/read all lines including BLANK LINES.<\/p>\n<p>example of text file:<\/p>\n<p>abc<br \/>\ndef<\/p>\n<p>ghi<br \/>\njkl<br \/>\nmno<\/p>\n<p>pqr<\/p>\n<p>Now if I use For loop to read this text file, it ignores blank lines and gives me count of total 6 instead of 9 lines.<\/p>\n<p>Any Idea how can I accomplish this task?<\/p>\n<p>Thank you<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":8},"question-category":[55],"question_tags":[],"class_list":["post-3750","question","type-question","status-publish","hentry","question-category-programming"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/3750","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=3750"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=3750"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=3750"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=3750"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}