bash-Skript klappt nicht so recht
Florian Lohoff
flo at rfc822.org
Thu Mar 27 22:30:02 CET 2003
On Thu, Mar 27, 2003 at 07:02:51PM +0100, Hauke Joachim Zuehl wrote:
> find . -name "$BILD*.jpg" | while read i
> do
> ls $i
> TST=1
> echo "TST in while: $TST"
> done
>
> echo "TST nach find: $TST"
>
> exit 0
> Auch exportieren hat nichts gebracht und die PID der Shell aendert sich
> auch nicht (dachte, es wird durch die Pipe eine Subshell aufgemacht).
Durch das pipe wird eine subshell aufgemacht. Wenn die anzahl der zu
durchsuchenden elemente nicht gerade 4-8kb uebersteigt dann geht das
halt auch so
for i in `find . -name "$BILD*.jpg"`; do
echo $i
done
Limitiert ist das durch die command line length die IIRC in der glibc
limitiert ist.
Ansonsten wuerde ich das (wie schon als ugly bezeichnet) durch eine temp
datei machen.
Flo
--
Florian Lohoff flo at rfc822.org +49-5201-669912
Heisenberg may have been here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://lug-owl.de/pipermail/linux/attachments/20030327/1bc7a47e/attachment.sig>
More information about the Linux
mailing list