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