After some efforts, I found some error from 62107669 to 62107678 line in one fastq file1,
and from 211806809 to 211806818 line in another fastq file2, so I decided to delete these
lines.
I issued the following commands,
wc -l file1 >>fq.wc
sed -i '62107669,62107678d' file1
wc -l file1 >>fq.wc
wc -l file2 >>fq.wc
sed -i '211806809,211806818d' file2
wc -l file2 >>fq.wc
Unexpected, I got the fq.wc file like this,
633538931 file1
633538931 file1
871708178 file2
871708168 file2
Obviously,sed -i didn't work in the file1 but worked well in file2,
and I am sure for this after manual checking.
Then I changed my command,
head -n 62107668 file1 >file.c
tail -n 571431253 file1 >>file.c
Unfortunately, it seems that head can run but tail can't.
Finally, I solved this problem using perl to read and write line by line.
I am confused why sed and tail failed,is this phenomenon about the big number? But they work well in the file2 which has bigger number lines than file1.
Any suggestion will be welcome, thanks.
and from 211806809 to 211806818 line in another fastq file2, so I decided to delete these
lines.
I issued the following commands,
wc -l file1 >>fq.wc
sed -i '62107669,62107678d' file1
wc -l file1 >>fq.wc
wc -l file2 >>fq.wc
sed -i '211806809,211806818d' file2
wc -l file2 >>fq.wc
Unexpected, I got the fq.wc file like this,
633538931 file1
633538931 file1
871708178 file2
871708168 file2
Obviously,sed -i didn't work in the file1 but worked well in file2,
and I am sure for this after manual checking.
Then I changed my command,
head -n 62107668 file1 >file.c
tail -n 571431253 file1 >>file.c
Unfortunately, it seems that head can run but tail can't.
Finally, I solved this problem using perl to read and write line by line.
I am confused why sed and tail failed,is this phenomenon about the big number? But they work well in the file2 which has bigger number lines than file1.
Any suggestion will be welcome, thanks.
Comment