[wellylug] cat bug ?

Chris Harris Chris.harris at actrix.gen.nz
Mon Mar 7 21:35:15 NZDT 2005


Hi Folks

I had 2,256  1,048,576 byte files that were supposed to be one 2.2G file
so I naively typed:

	cat b00* > ../space/c.raw 

I was surprised to discover the output was only 1,048,576,000 bytes.  
I presume cat takes at most 1000 <= argc.  
It would have been nice if it had told me.

I ended up making 3 files with:

  for m in b00 b01 b02
  do 	
    for n in $m*
    do 
      cat $n >> ../space/$m.raw
    done
  done

After getting a corrupted file of the right size with:

  for n in b0*
  do 
    cat $n >> ../space/d.raw
  done

Anyone got the cat 5.2.1 source code open in front of them?

C




More information about the wellylug mailing list