Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

binary.peek(3kaya) [debian man page]

Binary.peek(3kaya)					       Kaya module reference						Binary.peek(3kaya)

NAME
Binary::peek - Query binary data. SYNOPSIS
Int peek( Binary block, Int offset ) ARGUMENTS
block The binary block offset The location to read from (starting from zero) DESCRIPTION
Retrieve the byte at offset offset An Binary.OffsetOutOfRange(3kaya) exception will be thrown if it attempts to access a value outside the block. AUTHORS
Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/ LICENSE
The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation. RELATED
Binary.Binary(3kaya) Binary.array(3kaya) Binary.getBlockChunk(3kaya) Binary.peekString(3kaya) Binary.poke(3kaya) Kaya October 2012 Binary.peek(3kaya)

Check Out this Related Man Page

Binary.peekString(3kaya)				       Kaya module reference					  Binary.peekString(3kaya)

NAME
Binary::peekString - Read a String from binary data. SYNOPSIS
String peekString( Binary block, Int offset ) ARGUMENTS
block The binary block offset The location to read from (starting from zero) DESCRIPTION
Peek at the string val starting at offset offset An Binary.OffsetOutOfRange(3kaya) exception will be thrown if it attempts to access a value outside the block. Note that Kaya assumes the String is stored in the block in UTF-8 encoding, with null-termination. AUTHORS
Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/ LICENSE
The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation. RELATED
Binary.Binary(3kaya) Binary.array(3kaya) Binary.getBlockChunk(3kaya) Binary.peek(3kaya) Binary.pokeString(3kaya) Kaya October 2012 Binary.peekString(3kaya)
Man Page

15 More Discussions You Might Find Interesting

1. Programming

C

Hi All, I have a Binary file and I want to read the file and write as ASCII. If anybody knows the method, please mail me to : kkodava@maxis.com Thanks Krishna (4 Replies)
Discussion started by: krishna
4 Replies

2. UNIX for Advanced & Expert Users

Need to convert Binary files to ascii

Dear Experts I need to read a binary file. I know for example in byte number 3801-3804 there is a 4 byte number embeded. Is there a way to extract this number from this file and then convert it to ascii via unix?? Your help would be highly appreciated. Very Best Regards Reza (5 Replies)
Discussion started by: Reza Nazarian
5 Replies

3. Shell Programming and Scripting

Binary or ascii file

I want to verify the file is Binary or ascii file and accordingly I want to switch the program with ret code ie 0 or success and 1 for failure Can any one help me is this a correct syntex...i am getting error #!/bin/ksh $file filename if echo "ascii fie Found" else echo " binary... (6 Replies)
Discussion started by: u263066
6 Replies

4. Shell Programming and Scripting

Binary operator expected

Within my script, there is this following if, then statement. It basically looks for files in a directory that match a certain naming convention (bingofile*.DAT) and are non empty files and moves these files to a diff. directory. The script works okay if there is only one file matching the search... (4 Replies)
Discussion started by: basisvasis
4 Replies

5. Solaris

Solaris 5.8 - BinaryFile - Endianness

Dear Users, How do I account for endian-ness while reading a Binary File generated from Solaris 5.8 (Sparc) on a Windows XP (x86) system. I just know that its a Binary File. I have no knowledge about the native datatype of the Binary File. (20 Replies)
Discussion started by: angshuman_ag
20 Replies

6. UNIX for Dummies Questions & Answers

Binary line being inserted while truncating a file

Hi All, I have a ln between two files (say ln a b), when i truncate file " b ", this truncates file " a " also, a binary line is being added as the first line of both the files. This is causing problems with other scripts which grep on the above files. (though i can work my way around... (4 Replies)
Discussion started by: akshay61286
4 Replies

7. Programming

Binary Tree

I have just been researching this topic and I was wondering what type of application might a binary tree be used for. For instance what type of application would be a good showcase for a binary tree that I could write as an example? (5 Replies)
Discussion started by: sepoto
5 Replies

8. Shell Programming and Scripting

Editing Binary File

Dear Experts, I have one binary file which contains multiple 31k (31744) records. Each record begins with "a6 82". So the pattern is: a6 82 (+31742 bytes) a6 82 (+31742 bytes) a6 82 (+31742 bytes) a6 82 (+31742 bytes) There are some corrupted files where record does... (6 Replies)
Discussion started by: dhiraj4mann
6 Replies

9. Shell Programming and Scripting

Report the current time in Binary format

Hey fellas, I am trying to report the current time in a binary format which is overwriting every second. So far I wrote following script which I know looks stupid since I'm a newbie! ;) #!/bin/bash while true; do clear; date | awk '{print $4}' | awk -F ":" '{print... (4 Replies)
Discussion started by: @man
4 Replies

10. AIX

Binary Comparision

Hi Folks, Is there any way to compare the binaries which are built in AIX (5.3.0) environment? Thanks in advance. MKR (4 Replies)
Discussion started by: MKR
4 Replies

11. UNIX for Advanced & Expert Users

How to parse a binary file?

Hello to all in forum, Please your help with this. I have a binary file that is represented in Binary or Binary Coded Decimal (BCD). Do you know a parser for this kind of binary files? I have the structure format, but I don't know how and where to begin. You answer would be very... (15 Replies)
Discussion started by: Ophiuchus
15 Replies

12. Shell Programming and Scripting

Hexadecimal to Binary conversion

Hi Guys, Is it possible to convert the hexadecimal to Binary by unix command.....I could not figure out.... If I need to convert AF6D to binary...what could be the way to do? Thanks in advance!! ---------- Post updated at 02:57 AM ---------- Previous update was at 02:42 AM ---------- I... (6 Replies)
Discussion started by: Indra2011
6 Replies

13. Programming

Writing a file in Binary

Hello All, I need to read values from database and then need to write to a file. Planning to do that as binary since no one can modify the values. We tried to write the file in "B" mode and the file is created but when I try to open in notepad I am able to do. I there a way that someone should... (4 Replies)
Discussion started by: arunkumar_mca
4 Replies

14. UNIX for Advanced & Expert Users

Binary write POSIX-ly.

Hi guys and gals... I am now beyond the limits of my POSIX knowledge here. Below is a piece of code that runs perfectly well on small string lengths, BYTE sizes up to around 1KB, (3KB of octal text). It generates byte vlues from 0x00 to 0xFF. It passes Shell Check's requirements and... (6 Replies)
Discussion started by: wisecracker
6 Replies

15. UNIX for Beginners Questions & Answers

Binary operator expected

Hi Team, I just started to learn shell scripting and i got this script from an online book and tried to run in my terminal. But it throws error message. echo $0 -bash echo $UID 501 cat check_rootuser.sh #!/bin/bash # Run as root, of course. LOG_DIR=/var/log ROOT_UID=0 # Only users... (4 Replies)
Discussion started by: SelvaKumarq
4 Replies