Computing.Net > Forums > Unix > cut 1 file to records

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

cut 1 file to records

Reply to Message Icon

Name: manoon_khwan
Date: January 25, 2007 at 21:55:48 Pacific
OS: UNIX
CPU/Ram: Unkwone
Product: Unkwone
Comment:

Hi
Can any one please suggest!
I need to splite ascii file with no line feed between records to records.
Actuall each record have 8 character to tell how many byte for this particular records.First 8 character will present length of records in byte like the sample first records is '00000247'(247 byte) and second is '00000251'.The other information is records is fixed with 80 column.

sample record
00000247||||||1|1||||||||||010526888||100|34447|||1|34827391|||1017||||2||||||||||100||22-01-2007 11:19:53|22-01-2007 11:20:01|||NSwitch||||||20||||||0001,0526888,34827391,100|||0015|034827391||3A366F0F|||000000|0002|||||||||||00000251||||||2|2||||||||||00104996||100|32589|||1|6869944188|||1017||||2||||||||||100||22-01-2007 11:19:33|22-01-2007 11:19:47|||NSwitch
||||||34||||||0001,0104996,869944188,100|||0015|0869944188||0042D77C9|||000000|0002|||||||||||00000250||




Sponsored Link
Ads by Google

Response Number 1
Name: nails
Date: January 26, 2007 at 08:12:52 Pacific
Reply:

I'm interpreting that your first record should be 247 bytes from where the next record starts at 00000251. It isn't. It's around 228. Is your data correct?


0

Response Number 2
Name: manoon_khwan
Date: January 26, 2007 at 20:03:32 Pacific
Reply:

Hi nails
Thank for your intention
That rigth my sample data was 2 records, first records is 247 byte and second record is 251 byte etc.BTW I edit/delete some part of these data due to my security reason.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: cut 1 file to records

Move files after 1 mth to other dir www.computing.net/answers/unix/move-files-after-1-mth-to-other-dir/4171.html

How to convert text file to html www.computing.net/answers/unix/how-to-convert-text-file-to-html/4709.html

Looping through files to ftp www.computing.net/answers/unix/looping-through-files-to-ftp/7687.html