[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Edlug Archive Jan 2003 ]

Re: [edlug] BASH question



Thanks for the help guys,

I've put in a request for a recompiled bash.

In the meantime the rather hackey solution I've come up with is to do
(more-or-less) this instead:

if /home/cpan/bin/perl -e 'exit ((-M "file1"<-M "file2")?0:1)'; then ...

since this 5.6.0 installation of perl copes, although the default installation
/usr/bin/perl (which is 5.004) doesn't (which led to the above test working on
the command line but not in cron [as I'd initially left out the path to perl] and
some hair-pulling)!

In case anyone is about to ask why we don't do the whole script in perl, it's an
existing bash script which has just started to be used against 2Gb files.

Cheers,

Ben

On Wed, 15 January, 2003 22:26, Stephen C. Tweedie wrote:
> Hi,
>
> On Wed, 2003-01-15 at 16:11, Ben Soares wrote:
> > Okay, my actual problem is that the "file1 -nt file2" (newer than) test
> > operator is failing to give the right answer when set against two files
> > bigger than 2Gb.  Also, filename expansion like "ls file[12]" also fails
> > with "No such file or directory".  Is this likely to be because large
> > file support is not compiled in?
>
> Yes, it definitely sounds like it.
>
> > or is it a bug in bash?
>
> No, here's bash running against a large (sparse) file on my current Red
> Hat box ---
>
> 	$ du -h big
> 	0       big
> 	$ ls -lh big
> 	-rw-rw-r--    1 sct      sct           64G Jan 15 22:22 big
> 	$ echo b*
> 	big
> 	$
>
> Cheers,
>  Stephen
>
> -----------------------------------------------------------------------
> You can find the EdLUG mailing list FAQ list at:
> http://www.edlug.org.uk/list_faq.html

-- 
Ben Soares                              	   tel:	+44 (0)131-651 1238
EDINA, Edinburgh University Data Library	   fax:	+44 (0)131-650 3308
Main Library Building, George Square    	 email:	ben.soares@xxx.xxx.xxx
Edinburgh EH8 9LJ, Scotland, UK         	   www:	http://edina.ac.uk/

"Hmmm, that makes no sense to me...
 But then you are very small, perhaps you're right." -- Treebeard


-----------------------------------------------------------------------
You can find the EdLUG mailing list FAQ list at:
http://www.edlug.org.uk/list_faq.html



This archive is kept by wibble@morpheux.org.DONTSPAMME
homepage