[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about find(1): How to invoke multiple commands in exec?
From: |
martin |
Subject: |
Re: Question about find(1): How to invoke multiple commands in exec? |
Date: |
Mon, 19 Jul 2004 15:53:03 +0200 |
User-agent: |
Emacs Gnus |
"AR" == Andreas R <not_a_real_address@nowhere.com> writes:
AR> Date: Mon, 19 Jul 2004 14:33:13 +0200
AR>
AR> If for example I want to count all the files in a subdirectories of the
AR> current directory, I thoght I would need something like that:
hi,
try
find . -type f -print | wc -l
martin
AR>
AR> find . -type d -exec find "{}" -print | wc -l \;
AR> find: missing argument to `-exec'
AR> wc: ;: No such file or directory
AR>
AR> Parenthesing doesn't help:
AR> find . -type d -exec (find "{}" -print | wc -l) \;
AR> bash: syntax error near unexpected token `('
AR>
AR> Escaping the parentheses doesn't help either:
AR> find . -type d -exec \( find "{}" -print | wc -l \) \;
AR> find: missing argument to `-exec'
AR> wc: ): No such file or directory
AR> wc: ;: No such file or directory
AR> 0 total
AR>
AR> Does anyone has an idea how to do it the right way?
AR>
AR>
--
martin dot fischer at boschrexroth dot de