Quote:
so basically i need some kind of for...next loop for each line of the file
[/b]
|
Note, piping can get you in trouble, because the loop will be done in a subshell. You'll be scatching your head why variables after the loop don't reflect changes made within the loop ;-)
Some options:
while read line; do echo $line; done < your_file
while read line; do echo $line; done < <(cat your_file) # No space between <(
while read line; do echo $line; done < <(issue your_command here to generate list of files)
for line in "$(cat your_file)"; do echo "$line"; done
for line in "$(< your_file)"; do echo "$line"; done
Hope that helps with some of your options.