Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

how to perform an action for each line in bash

while read line
do
   echo $line
   // or some_function "$line"
done < testfile.txt
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #perform #action #line #bash
ADD COMMENT
Topic
Name
4+9 =