Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: script within find
- X-seq: zsh-users 11840
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: script within find
- Date: Fri, 14 Sep 2007 08:41:56 -0700
- In-reply-to: <20070914091031.99414.qmail@xxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <7c737f300702232339keaffa58g99b1f51de74e0c8a@xxxxxxxxxxxxxx> <20070224100809.GA4828@xxxxxxxxxxxxxxx> <7c737f300704251214r602027a4u2d3533370fd317a9@xxxxxxxxxxxxxx> <20070425215214.GA8900@xxxxxxxxxxxxxxxxx> <20070425215843.GB8900@xxxxxxxxxxxxxxxxx> <7c737f300704251526m48df5c7dk6d32b340547e012d@xxxxxxxxxxxxxx> <17393e3e0704251538h10a32ff4xff95bb875d8ed193@xxxxxxxxxxxxxx> <7c737f300704251619y2566090cke411902726c27eec@xxxxxxxxxxxxxx> <7c737f300709110052t5797209w8ac77cd4d3aa6c3f@xxxxxxxxxxxxxx> <20070914091031.99414.qmail@xxxxxxxxxxx>
On Sep 14, 9:10pm, Atom Smasher wrote:
}
} find /path -param | while read n
} do
} cmd1 $n ; cmd2 $n
} cmd3 $n
} done
}
} as long as there aren't white spaces in the output of find, everything
} stays simple.
Trailing whitespace (a series of IFS characters) is stripped by read,
and backslashes have special meaning.
To avoid this you can do
find /path -param -print0 | while IFS= read -rd $'\0' n
Messages sorted by:
Reverse Date,
Date,
Thread,
Author