Change variable length records to fixed length

Completed Posted Aug 3, 2009 Paid on delivery
Completed Paid on delivery

I have a number of files that has variable length records in it. I need a program to read them and write them out as fixed length records

## Deliverables

This program needs to be written in C/C++ or perl and will need to run on a Debian 2.6 x64 machine. I have all of the compilers necessary.

The first 4 bytes of the record will tell the length of the record (first 4 bytes inclusive). The system that it came out of added a CRLF to the end of each record so those will need to be stripped. **Note - there are legitimate CRLF in the data that are not at the end of the record. They need to be retained.

All records need to be written out with right padding of spaces to the number of bytes specified by an argument.

./yourprogram <input file> <output file> <fixed length>

The above needs to be the command with parameters. Attached is a small sample of the data. The following is a list of each record length.

1300

808

131

340

340

340

340

340

340

340

340

340

1300

808

131

340

340

340

340

340

340

340

340

340

C Programming Engineering Linux MySQL PHP Project Management Software Architecture Software Testing

Project ID: #2821309

About the project

8 proposals Remote project Active Aug 3, 2009

Awarded to:

xmartin

See private message.

$127.5 USD in 2 days
(70 Reviews)
6.0

8 freelancers are bidding on average $107 for this job

koles23

See private message.

$102 USD in 2 days
(18 Reviews)
6.1
bmnetintern

See private message.

$127.5 USD in 2 days
(13 Reviews)
4.8
fensoft

See private message.

$85 USD in 2 days
(10 Reviews)
4.0
vw7195038vw

See private message.

$85 USD in 2 days
(4 Reviews)
2.3
directmailsl

See private message.

$127.5 USD in 2 days
(1 Review)
1.9
yates

See private message.

$100.3 USD in 2 days
(2 Reviews)
1.6
mastak128sl

See private message.

$102 USD in 2 days
(0 Reviews)
0.0