[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bash programming question



Or just use finds' exec option

find . -print -exec <some stuff> "{}" \;

Bob
:wq

P.S. The "{}" expands out to the current file name

----- Original Message -----
From: Shaleh <shaleh@livenet.net>
To: Michael Meskes <meskes@debian.org>
Cc: <debian-user@lists.debian.org>
Sent: Tuesday, January 19, 1999 4:08 PM
Subject: RE: bash programming question


>On 19-Jan-99 Michael Meskes wrote:
>> Hi,
>>
>> I have a small sh script that does essantially the following:
>>
>> variable=`find . -print`
>>
>> for file in $variable
>> do
>>       <some stuff>
>> done
>>
>
>try:
>
>for file in `find . -print`
>do
>        ${file}
>done
>
>The braces should help keep the variable consistent.  So far I see nothing
>"bash" here.  This is also a valid ksh or ash script.  If you leave off the
>'function' keyword many supposed bash scripts are valid bourne scripts.
>


Reply to: