Quantcast
Channel: Bash - Looping through Array in Nested [FOR, WHILE, IF] statements - Unix & Linux Stack Exchange
Browsing all 3 articles
Browse latest View live

Answer by Kusalananda for Bash - Looping through Array in Nested [FOR, WHILE,...

It looks like you want to get all the lines that contains at least one out of a set of words, from a set of files.Assuming that you don't have many thousands of files, you could do that with a single...

View Article



Answer by muru for Bash - Looping through Array in Nested [FOR, WHILE, IF]...

Adding an array doesn't particularly help: you still would need to loop over the elements of the array (see How do I test if an item is in a bash array?):while read -r lo; do for keyword in...

View Article

Bash - Looping through Array in Nested [FOR, WHILE, IF] statements

I am trying to process a large file-set, appending specific lines into the "test_result.txt" file - I achieved it -not very elegantly- with the following code.for i in *merged; do while read -r lo; do...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images