Hi all, Simple problem I am not getting. Please apply cluebat.
I have an accumulator variable inside a while loop. I want access to the contents after the while loop completes but am getting a null value. Thanks, #!/bin/bash # # to test make file foo with single line in same directory as test # script cat foo | while read line ; do let error_code=$error_code+1 echo "error_code inside while loop $error_code" done echo "error_code outside while loop $error_code" # end test script -- I reason and act, therefore, ken_i_m Chief Gadgeteer, Elegant Innovations Founder, Bozeman Linux Users Group Founder, Helena Linux Users Group (406) 581-0495 -- http://linuxfromscratch.org/mailman/listinfo/lfs-chat FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
