Sponsored Content
Top Forums Shell Programming and Scripting PROBLEM with another binary file Post 302933912 by wisecracker on Tuesday 3rd of February 2015 03:12:18 AM
Old 02-03-2015
Hi prorocomm...

I thought of using od something like this and filtering out the correct numbers.
(This is a 512 byte test binary file of mine, OSX 10.7.5, default bash terminal.)
Code:
AMIGA:barrywalker~/Desktop/Code/Shell> od -tu1 -An binary.bin
            0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
           16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31
           32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47
           48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63
           64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79
           80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95
           96  97  98  99 100 101 102 103 104 105 106 107 108 109 110 111
          112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
          128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
          144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
          160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
          176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
          192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
          208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
          224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
          240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
            0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
           16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31
           32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47
           48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63
           64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79
           80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95
           96  97  98  99 100 101 102 103 104 105 106 107 108 109 110 111
          112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
          128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
          144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
          160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
          176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
          192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
          208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
          224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
          240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255

Bazza...
 

10 More Discussions You Might Find Interesting

1. Solaris

compiled binary file gives "cannot execute binary file"

Hi, I have two Solaris machines. 1. SunOS X 5.8 Generic_108528-29 sun4u sparc SUNW,Sun-Blade-1500 2. SunOS Y 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-60 I am trying to buiild a project on both these machines. The Binary output file compiled on machine 2 runs on both the machines. Where... (0 Replies)
Discussion started by: scgupta
0 Replies

2. Filesystems, Disks and Memory

UNIX problem concerning Microsoft Office Binary

I just started using Terminal on my Mac this summer, and right now I am having problems making a shell script. This shell should run the "Microsoft Setup Assistant" once I run the Automator Script. Alas, I still have problems. Here is the offending scriptlet: Sudo Tcsh root# cd... (2 Replies)
Discussion started by: chrisfrap
2 Replies

3. Solaris

problem when decoding a binary file

I tried to decode a binary script using the command 'uudecode'. but it is giving error as 'No begining line'. 'uudecode -o <outfile name> <binary file>' Please help me in resolving this. (4 Replies)
Discussion started by: vamshikrishnab
4 Replies

4. SCO

SCO unix binary compatibility problem

Hi I am looking for sco xenix binary compatibility utility "cvtomf",(convert omf object to COFF object) Would you please help me ? tnx (3 Replies)
Discussion started by: javad1_maroofi
3 Replies

5. UNIX for Dummies Questions & Answers

Pipe binary file matches grep results to file

I am using grep to match a pattern, but the output is strange. $ grep -r -o "pattern" * Gives me: Binary file foo1 matches Binary file foo2 matches Binary file foo3 matches To find the lines before/after, I then have to use the following on each file: $ strings foo1 | grep -A1 -B1... (0 Replies)
Discussion started by: chipperuga
0 Replies

6. Shell Programming and Scripting

Output redirection of c binary file to a file in shell script is failing

I am struck up with a problem and that is with output redirection. I used all the ways for the redirection of the output of c binary to a file, still it is failing. Here are the different ways which I have used: ./a.out | tee -a /root/tmp.txt 2>&1 ./a.out | tee -a /root/tmp.txt 1>&1 ./a.out |... (2 Replies)
Discussion started by: Maya29988
2 Replies

7. UNIX for Dummies Questions & Answers

[AIX] Binary file warning for text file.

Hello guys, We had to move from a DC to another, and we are now facing an "issue" with some text files. Looks like that some of our log files are set as binary: file TuxConnectorURA.20121012 TuxConnectorURA.20121012: data or International Language text less TuxConnectorURA.20121012... (2 Replies)
Discussion started by: EnioMarques
2 Replies

8. Shell Programming and Scripting

Convert binary file to csv and then back to the binary format

Hello *nix specialists, Im working for a non profit organisation in Germany to transport DSL over WLAN to people in areas without no DSL. We are using Linksys WRT 54 router with DD-WRT firmware There are at the moment over 180 router running but we have to change some settings next time. So my... (7 Replies)
Discussion started by: digidax
7 Replies

9. Shell Programming and Scripting

Problem with binary file

I have a binary file with all content is text, i want convert this binary to a regular file because i want to parse it. Thx. ---------- Post updated at 05:01 AM ---------- Previous update was at 04:34 AM ---------- I have found the solution cat file | tr -d '\0' (8 Replies)
Discussion started by: protocomm
8 Replies

10. Web Development

Problem in printing binary tree using php and mysql

Database Structure Root Table ID Root_ Node Level 1 A 0 2 B 1 3 C 1 Child Table ID Left_Node Right_Node Root_Node Root_ID 1 B C A 1 ... (1 Reply)
Discussion started by: Deepak Tiwari
1 Replies
KOI8-R(7)						     Linux Programmer's Manual							 KOI8-R(7)

NAME
koi8-r - Russian character set encoded in octal, decimal, and hexadecimal DESCRIPTION
RFC 1489 defines an 8-bit character set, KOI8-R. KOI8-R encodes the characters used in Russian. KOI8-R characters The following table displays the characters in KOI8-R that are printable and unlisted in the ascii(7) manual page. Oct Dec Hex Char Description ------------------------------------------------------------------------ 200 128 80 BOX DRAWINGS LIGHT HORIZONTAL 201 129 81 | BOX DRAWINGS LIGHT VERTICAL 202 130 82 BOX DRAWINGS LIGHT DOWN AND RIGHT 203 131 83 BOX DRAWINGS LIGHT DOWN AND LEFT 204 132 84 BOX DRAWINGS LIGHT UP AND RIGHT 205 133 85 BOX DRAWINGS LIGHT UP AND LEFT 206 134 86 BOX DRAWINGS LIGHT VERTICAL AND RIGHT 207 135 87 BOX DRAWINGS LIGHT VERTICAL AND LEFT 210 136 88 BOX DRAWINGS LIGHT DOWN AND HORIZONTAL 211 137 89 BOX DRAWINGS LIGHT UP AND HORIZONTAL 212 138 8A BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL 213 139 8B UPPER HALF BLOCK 214 140 8C LOWER HALF BLOCK 215 141 8D FULL BLOCK 216 142 8E LEFT HALF BLOCK 217 143 8F RIGHT HALF BLOCK 220 144 90 LIGHT SHADE 221 145 91 MEDIUM SHADE 222 146 92 DARK SHADE 223 147 93 TOP HALF INTEGRAL 224 148 94 BLACK SQUARE 225 149 95 BULLET OPERATOR 226 150 96 / SQUARE ROOT 227 151 97 ~~ ALMOST EQUAL TO 230 152 98 <= LESS-THAN OR EQUAL TO 231 153 99 >= GREATER-THAN OR EQUAL TO 232 154 9A NO-BREAK SPACE 233 155 9B BOTTOM HALF INTEGRAL 234 156 9C o DEGREE SIGN 235 157 9D 2 SUPERSCRIPT TWO 236 158 9E . MIDDLE DOT 237 159 9F -:- DIVISION SIGN 240 160 A0 BOX DRAWINGS DOUBLE HORIZONTAL 241 161 A1 BOX DRAWINGS DOUBLE VERTICAL 242 162 A2 BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE 243 163 A3 CYRILLIC SMALL LETTER IO 244 164 A4 BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE 245 165 A5 BOX DRAWINGS DOUBLE DOWN AND RIGHT 246 166 A6 BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE 247 167 A7 BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE 250 168 A8 BOX DRAWINGS DOUBLE DOWN AND LEFT 251 169 A9 BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE 252 170 AA BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE 253 171 AB BOX DRAWINGS DOUBLE UP AND RIGHT 254 172 AC BOX DRAWINGS UP SINGLE AND LEFT DOUBLE 255 173 AD BOX DRAWINGS UP DOUBLE AND LEFT SINGLE 256 174 AE BOX DRAWINGS DOUBLE UP AND LEFT 257 175 AF BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE 260 176 B0 BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE 261 177 B1 BOX DRAWINGS DOUBLE VERTICAL AND RIGHT 262 178 B2 BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE 263 179 B3 CYRILLIC CAPITAL LETTER IO 264 180 B4 BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE 265 181 B5 BOX DRAWINGS DOUBLE VERTICAL AND LEFT 266 182 B6 BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE 267 183 B7 BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE 270 184 B8 BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL 271 185 B9 BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE 272 186 BA BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE 273 187 BB BOX DRAWINGS DOUBLE UP AND HORIZONTAL 274 188 BC BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE 275 189 BD BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE 276 190 BE BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL 277 191 BF (C) COPYRIGHT SIGN 300 192 C0 CYRILLIC SMALL LETTER YU 301 193 C1 CYRILLIC SMALL LETTER A 302 194 C2 CYRILLIC SMALL LETTER BE 303 195 C3 CYRILLIC SMALL LETTER TSE 304 196 C4 CYRILLIC SMALL LETTER DE 305 197 C5 CYRILLIC SMALL LETTER IE 306 198 C6 CYRILLIC SMALL LETTER EF 307 199 C7 CYRILLIC SMALL LETTER GHE 310 200 C8 CYRILLIC SMALL LETTER HA 311 201 C9 CYRILLIC SMALL LETTER I 312 202 CA CYRILLIC SMALL LETTER SHORT I 313 203 CB CYRILLIC SMALL LETTER KA 314 204 CC CYRILLIC SMALL LETTER EL 315 205 CD CYRILLIC SMALL LETTER EM 316 206 CE CYRILLIC SMALL LETTER EN 317 207 CF CYRILLIC SMALL LETTER O 320 208 D0 CYRILLIC SMALL LETTER PE 321 209 D1 CYRILLIC SMALL LETTER YA 322 210 D2 CYRILLIC SMALL LETTER ER 323 211 D3 CYRILLIC SMALL LETTER ES 324 212 D4 CYRILLIC SMALL LETTER TE 325 213 D5 CYRILLIC SMALL LETTER U 326 214 D6 CYRILLIC SMALL LETTER ZHE 327 215 D7 CYRILLIC SMALL LETTER VE 330 216 D8 CYRILLIC SMALL LETTER SOFT SIGN 331 217 D9 CYRILLIC SMALL LETTER YERU 332 218 DA CYRILLIC SMALL LETTER ZE 333 219 DB CYRILLIC SMALL LETTER SHA 334 220 DC CYRILLIC SMALL LETTER E 335 221 DD CYRILLIC SMALL LETTER SHCHA 336 222 DE CYRILLIC SMALL LETTER CHE 337 223 DF CYRILLIC SMALL LETTER HARD SIGN 340 224 E0 CYRILLIC CAPITAL LETTER YU 341 225 E1 CYRILLIC CAPITAL LETTER A 342 226 E2 CYRILLIC CAPITAL LETTER BE 343 227 E3 CYRILLIC CAPITAL LETTER TSE 344 228 E4 CYRILLIC CAPITAL LETTER DE 345 229 E5 CYRILLIC CAPITAL LETTER IE 346 230 E6 CYRILLIC CAPITAL LETTER EF 347 231 E7 CYRILLIC CAPITAL LETTER GHE 350 232 E8 CYRILLIC CAPITAL LETTER HA 351 233 E9 CYRILLIC CAPITAL LETTER I 352 234 EA CYRILLIC CAPITAL LETTER SHORT I 353 235 EB CYRILLIC CAPITAL LETTER KA 354 236 EC CYRILLIC CAPITAL LETTER EL 355 237 ED CYRILLIC CAPITAL LETTER EM 356 238 EE CYRILLIC CAPITAL LETTER EN 357 239 EF CYRILLIC CAPITAL LETTER O 360 240 F0 CYRILLIC CAPITAL LETTER PE 361 241 F1 CYRILLIC CAPITAL LETTER YA 362 242 F2 CYRILLIC CAPITAL LETTER ER 363 243 F3 CYRILLIC CAPITAL LETTER ES 364 244 F4 CYRILLIC CAPITAL LETTER TE 365 245 F5 CYRILLIC CAPITAL LETTER U 366 246 F6 CYRILLIC CAPITAL LETTER ZHE 367 247 F7 CYRILLIC CAPITAL LETTER VE 370 248 F8 CYRILLIC CAPITAL LETTER SOFT SIGN 371 249 F9 CYRILLIC CAPITAL LETTER YERU 372 250 FA CYRILLIC CAPITAL LETTER ZE 373 251 FB CYRILLIC CAPITAL LETTER SHA 374 252 FC CYRILLIC CAPITAL LETTER E 375 253 FD CYRILLIC CAPITAL LETTER SHCHA 376 254 FE CYRILLIC CAPITAL LETTER CHE 377 255 FF CYRILLIC CAPITAL LETTER HARD SIGN NOTES
The differences with KOI8-U are in the hex positions A4, A6, A7, AD, B4, B6, B7, and BD. SEE ALSO
ascii(7), charsets(7), cp1251(7), iso_8859-5(7), koi8-u(7), utf-8(7) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. Linux 2016-07-17 KOI8-R(7)
All times are GMT -4. The time now is 03:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy