I've "squirreled" that one away on GitHub, in a gist. Thanks.

On Mon, Dec 21, 2015 at 11:00 AM, Greg Wooledge <wool...@eeg.ccf.org> wrote:

> On Mon, Dec 21, 2015 at 08:53:55AM -0700, Krem wrote:
> > I tried this one, but failed if the folder has more than one file name
> (eg
> > *.csv) in that folder.
>
> Seriously, use this one:
>
> find . \( -iname '*.txt' -o -iname '*.csv' \) -exec bash -c '
>   for f; do
>     IFS=/ read -ra part <<< "$f"
>     printf "%-10.10s  %-10.10s  %-20.20s  %5d\n" \
>       "${part[1]}" "${part[2]}" "${part[3]}" "$(wc -l < "$f")"
>   done
> ' _ {} +
>
> Adjust it as needed.  This is the most straightforward approach to the
> problem.
>
>


-- 
Computer Science is the only discipline in which we view adding a new wing
to a building as being maintenance -- Jim Horning

Schrodinger's backup: The condition of any backup is unknown until a
restore is attempted.

Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be.

He's about as useful as a wax frying pan.

10 to the 12th power microphones = 1 Megaphone

Maranatha! <><
John McKown

Reply via email to