The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 07-02-2008
ayanbiswas ayanbiswas is offline
Registered User
  
 

Join Date: Jun 2008
Location: Bangalore
Posts: 6
Cool Record count problem using sed command

Hi,

I have a script which removes 2 header records and 1 trailer record in a list of files. The commands doing the actions are
sed '1,2d' $file > tempfile1.dat
sed '$d' < tempfile1.dat > $output.txt

Its working fine for all records except a file having size=1445509814 and number of records=13152342. The output has only 5297671 records instead of being just 3 less than the original count.
Is there any limitation on the number of records that the sed command can process?
Some details-
>uname -a
SunOS xx 5.10 SunOS_Development sun4u sparc SUNW,Sun-Fire

>df -k .
Filesystem kbytes used avail capacity Mounted on
xx 67091946 64377506 2043521 97% xx


>df -k /tmp
Filesystem kbytes used avail capacity Mounted on
swap 17337536 1504840 15832696 9% xx