From: j-o-e-h on
Am 18.02.2010 13:42, schrieb Ben Bacarisse:
> j-o-e-h<j-o-e-h(a)web.de> writes:
>
>> Am 17.02.2010 18:54, schrieb Ed Morton:
> <snip>
>>> It's interesting that so far most of the reponses have been addressing
>>> the syntax of the "for" loop rather than the question of whether or
>>> not you actually need a "for" loop.
>>>
>>> If the OPs code actually looks something like this:
>>>
>>> for i in [Dd][Oo]*.pdf
>>> do
>>> cat "$i"
>>> done
>>>
>>> I wonder if the OP will be happy in the long run to know he really
>>> nailed that for loop syntax rather than learning he didn't need a loop
>>> in the first place :-).
>>
>> I do agree, that I didn't think of that before.
>> A loop would be needed if u were going to work on those files
>> (e.g. add a # copyright by ... line to the end of the files).
>
> Not necessarily:
>
> sed -i -e '$aCopyright Me 2010' [Dd][Oo].pdf
>
> <snip>

Great! That'd be a lot easier for that purpose. Thanks, unfortunately I
just started "shelling" a few weeks ago - so i still have to learn a lot
and that's why I'm on this newsgroup.