Quantcast
Channel: Bash: How to read one line at a time from output of a command? - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 7

Answer by ᄂᄀ for Bash: How to read one line at a time from output of a command?

$
0
0

Remember that invoking commands has a cost (irrespective of what they do). This can have very negative impact on performance if you put them into a loop that will have multiple iterations. In case you need to process the output in some way, consider using awk. It is very powerful and can quickly handle a lot of input:

find . -type f | awk '{print}'

Viewing all articles
Browse latest Browse all 7

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>