On Mon, Dec 21, 2015 at 08:21:04AM -0600, John McKown wrote:
> find . -maxdepth 2 -mindepth 2 -type f -name '*.csv' -o -name '*.txt' |\
> egrep '^\./[0-9]' |\
> xargs awk 'ENDFILE {print FILENAME "\t" FNR;}' |\
> sed -r 's|^./||;s|/|\t|'   |\
> xargs -L 1 echo -e "${PWD##*/}\t"???

> ???This is "more elegant" (in my mathematically twisted mind) than my
> previous solution.

No, it's not.

In addition to whatever quoting bugs may still exist, now you're involving
xargs, which has ITS OWN ENTIRELY NEW set of bugs, and breaks on any
filename that contains whitespace, single quotes, or double quotes.

Reply via email to