Quantcast
Viewing all articles
Browse latest Browse all 7

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

A small modification of Stéphane Chazelas's answer.

find . -type f -exec bash -c 'echo $0; head $0;' {} \;

This shows how the script you give to bash -c takes the first argument.


Viewing all articles
Browse latest Browse all 7

Trending Articles



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