Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Split binary file every occurrence of a group of characters Post 302787545 by PatrickE on Friday 29th of March 2013 08:13:33 PM
Old 03-29-2013
From searching the files the main big constants only repeat at those strings. I think thats the right word. If there are at least 10 bits combined they only repeat in the main string. If its less than 4 I have found them repeat in parts of the file.


ahamed From what I have found that is always the same. However 00 00 01 BA repeats every 2048 bits.

---------- Post updated at 07:05 PM ---------- Previous update was at 07:02 PM ----------

as for the 2048.
Heres a list from a file.

Code:
00 00 01 BA 44 B7 25 15 75 11 01 89 C3 F8 00 00 01 BB 00 12 80 C4 E1 00 E1 7F B9 E0 E8 B8 C0 20
00 00 01 BA 44 B7 25 1A 05 BD 01 89 C3 F8 00 00 01 E0 07 EC 81 C0 0A 31 2D CB 70 1B 11 2D CB 4C
00 00 01 BA 44 B7 25 1E 9C 11 01 89 C3 F8 00 00 01 E0 07 EC 81 00 00 FB 54 F9 26 0C 67 00 AE BF
00 00 01 BA 44 B7 25 23 2C BD 01 89 C3 F8 00 00 01 BD 07 EC 81 80 05 21 2D C9 7D 01 81 02 01 E4
00 00 01 BA 44 B7 25 27 BD 69 01 89 C3 F8 00 00 01 E0 07 EC 81 00 00 E4 88 DA 77 AF 75 DD B6 D3

---------- Post updated at 07:13 PM ---------- Previous update was at 07:05 PM ----------

Hum maybe my original plan to split into 2K bits might actually work. Problem is it take up twice the space.

Last edited by Scrutinizer; 03-30-2013 at 05:46 AM.. Reason: code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Split a binary file into 2 basing on 2 delemiter string

Hi all, I have a binary file (orig.dat) and two special delimiter strings 'AAA' and 'BBB'. My binary file's content is as follow: <Data1.1>AAA<Data1.2>BBB <Data2.1>AAA<Data2.2>BBB ... <DataN.1>AAA<DataN.2>BBB DataX.Y might have any length, and contains any kind of special/printable... (1 Reply)
Discussion started by: Averell
1 Replies

2. Shell Programming and Scripting

Split these into many ...(/etc/group)!!

Guys Following input line is from /etc/group file.As we know last entry in a line of /etc/group is userlist (all the users belonging to that group). I need to splilt this one line into 3 lines as shown below (3 because userlist has 3 names in it). Input: lp:!:11:root,lp,printq ... (13 Replies)
Discussion started by: ak835
13 Replies

3. Shell Programming and Scripting

Split file by data group

Hi all, I'm having a little trouble solving a file split I need to get done. I have the following data: 1. Light 1A. Light Soft texture: it's soft color: the color value is that of something light vital statistics: srm: 23 og: 1.035 sp: 1.065 comment: this is nice if you like... (8 Replies)
Discussion started by: mkastin
8 Replies

4. Shell Programming and Scripting

Split binary file with pattern

Hello! Have some problem with extract files from saved session. File contains any kind of special/printable characters. DATA NumberA DATA DATA Begin DATA1.1 DATA1.2 NumberB1 DATA1.3 DATA1.4 End DATA DATA DATA Begin DATA2.1 DATA2.2 NumberB2 DATA2.3 DATA2.4 End DATA DATA ... (4 Replies)
Discussion started by: vvild
4 Replies

5. Shell Programming and Scripting

remove last characters after %EOF (pdf binary file)

Hi, I want to know how I can remove the last characters of ANY pdf file. I read it under "od" in the command shell to see which were the last characters: $od corruptedfile.pdf -c When I see the file, I need to keep only the last characters, or "end of the file": %EOF (obviously keeping all... (1 Reply)
Discussion started by: diegugawa
1 Replies

6. Shell Programming and Scripting

split file based on group count

Hi, can some one please help me to split the file based on groups. like in the below scenario x indicates the begining of the group and the file should be split each with 2 groups below there are 10 groups it should create 5 files. could you please help? (4 Replies)
Discussion started by: hitmansilentass
4 Replies

7. Shell Programming and Scripting

Deleting all characters before the last occurrence of /

Hi All, I have a text file with the following text in it: file:///About/accessibility.html file:///About/disclaimer.html file:///About/disclaimer.html#disclaimer file:///pubmed?term=%22Dacre%20I%22%5BAuthor%5D file:///pubmed?term=%22Madigan%20J%22%5BAuthor%5D... (8 Replies)
Discussion started by: shoaibjameel123
8 Replies

8. Shell Programming and Scripting

split a string and convert to binary

Hi All, Iam new to unix scripting and I want a split a string into 4 characters each, leaving the last two characters and convert the splitted values into binary. For example: string='ffd80012ffe20000ffebfffeffea0007fff0ffd70014fff1fff0fff0fff201' this should split as ffd8 0012 ffe2 . .... (5 Replies)
Discussion started by: srinivasayedla
5 Replies

9. UNIX for Dummies Questions & Answers

counting occurrence of characters in a string

Hello, I have a string like this 0:1:2:0:2:2:4:0:0:0:-200:500...... what i want is to break down how many different characters are there and their count. For example for above string it should display 0 - 5 times 1 - 1 times 2 - 3 times 4 - 1 times . . . I am stuck in writing... (8 Replies)
Discussion started by: exit86
8 Replies

10. Shell Programming and Scripting

Split a big file into multiple files based on first four characters

I have a requirement to split a huge file to smaller text files based on first four characters which look like ABCD 1234 DFGH RREX : : : : : 0000 Each of these records are OF EQUAL bytes with a different internal layout based on the above first digit identifier.. Any help to start... (5 Replies)
Discussion started by: etldev
5 Replies
textutil::repeat(n)				    Text and string utilities, macro processing 			       textutil::repeat(n)

__________________________________________________________________________________________________________________________________________________

NAME
textutil::repeat - Procedures to repeat strings. SYNOPSIS
package require Tcl 8.2 package require textutil::repeat ?0.7? ::textutil::repeat::strRepeat text num ::textutil::repeat::blank num _________________________________________________________________ DESCRIPTION
The package textutil::repeat provides commands to generate long strings by repeating a shorter string many times. The complete set of procedures is described below. ::textutil::repeat::strRepeat text num This command returns a string containing the text repeated num times. The repetitions are joined without characters between them. A value of num <= 0 causes the command to return an empty string. Note: If the Tcl core the package is loaded in provides the command string repeat then this command will be implemented in its terms, for maximum possible speed. Otherwise a fast implementation in Tcl will be used. ::textutil::repeat::blank num A convenience command. Returns a string of num spaces. BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category textutil of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. SEE ALSO
regexp(n), split(n), string(n) KEYWORDS
blanks, repetition, string CATEGORY
Text processing textutil 0.7.1 textutil::repeat(n)
All times are GMT -4. The time now is 02:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy