[CentOS] backups and md5 all in one while splitting
Ruslan Sivak
rsivak at istandfor.com
Wed Dec 5 22:49:43 UTC 2007
William L. Maltby wrote:
> On Tue, 2007-12-04 at 16:35 -0500, Ruslan Sivak wrote:
>
>> Ruslan Sivak wrote:
>>
>>> Shad L. Lords wrote:
>>>
>>>>> <snip>
>>>>>
>
>
>> Sorry to resurrect an old thread, but even though this works fine from
>> the command line, it doesn't seem to work from my perl script. I get
>> sh: -c: line 1: syntax error near unexpected token `('
>> sh: -c: line 1: `svnadmin dump --deltas /svn/russ
>> 2>>/backup/russ/2007/12/full.4.log | bzip2 | tee >(split -b 1888m -
>>
> AA
> ||
> Is this a valid construct in bash now? I'm unsure--++
> I've not RTFM recently, but doesn't this say to redirect standard output
> to a sub-shell? AFAIK, that's not valid? IIRC, the operand of the ?>?
> needs to be a "file" (which in the old-time *IX semantics includes
> devices, FIFOs, etc.).
>
> And "tee" wants a filename to write to, no?
>
> If you're not "tee"ing to a file, can't you drop tee and just pipe to
> the sub-shell?
>
>
Someone helped me with this syntax a few weeks back, and it works
perfectly from the shell. It just refuses to work from inside perl's
backticks.
>> /backup/russ/2007/12/full.4.bz2.) | md5sum >
>> /backup/russ/2007/12/full.4.md5'
>>
>>
>> Looks like it's running sh instead of bash? Is there a way to change
>> the shell that executes the command? I'm using backticks to execute the
>> command in perl.
>>
>
> I only dabbled in Perl briefly long ago. I would dare comment about
> that. I know the effects of the back-ticks in shells though. Same in
> Perl?
>
>
>> Russ
>> <snip sig stuff>
>>
>
> I hope my questions sparked a clue and wasn't just a band-width waste.
>
> --
> Bill
>
At least it's a reply... Hopefully someone who understand this a bit
more will see the thread.
Russ
More information about the CentOS
mailing list