Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Nothing works => Import using multiple compressed files ?!!

Re: Nothing works => Import using multiple compressed files ?!!

From: Mark Brinsmead <pythianbrinsmead_at_gmail.com>
Date: Tue, 30 May 2006 20:28:43 -0600
Message-ID: <cf3341710605301928o1ab7d4bax4ba2f0b706e832ab@mail.gmail.com>


Agreed.

I was following the style of the original code sample.

For simple file naming, you are quite correct. 'Sort' as used here is, indeed, pointless.

However, if my files were foolishly named something like

   foo_xxxxxxx_1.gz
   foo_xxxxxxx_2.gz
   foo_xxxxxxx_3.gz
   foo_xxxxxxx_4.gz
   foo_xxxxxxx_5.gz
   foo_xxxxxxx_6.gz
   foo_xxxxxxx_7.gz
   foo_xxxxxxx_8.gz
   foo_xxxxxxx_9.gz
   foo_xxxxxxx_10.gz
   foo_xxxxxxx_11.gz
   foo_xxxxxxx_12.gz

then most simple uses of 'sort' (including file globbing) will cause file numbers 10, 11, and 12 to
sort prior to file number 2. "Sufficiently clever" use of 'ls' and 'sort' could overcome this, although
my preference would be to simply rename the files...

On 5/26/06, Radoulov, Dimitre <cichomitiko_at_gmail.com> wrote:
>
> > for x in `ls $DUMPDIR/vald*.gz | sort`
> > do
> > sleep 60
> > gunzip < $x > /VMP1/archive/ngepipe.dmp
> >done &
>
> "ls" e "sort" are redundant.
>
> for x in $DUMPDIR/vald*.gz
> ...
>
>
> Regards
> Dimitre
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>

-- 
Cheers,
-- Mark Brinsmead
   Staff DBA,
   The Pythian Group
   http://www.pythian.com/blogs

--
http://www.freelists.org/webpage/oracle-l
Received on Tue May 30 2006 - 21:28:43 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US