11-03-2005
Thanks for your answer !
The reason i posted is :
1 i can'y install tool on the AIX , i'm not the root admin
2 i need an easy way to change the file for unix novice , simple users , so a script is the solution !
the range value is always the same , maybe an AWK can scan this range and do the change but i'm not AWK expert !
regards
Christian
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
not much familiar with binary and hex calculation in script programming....
explaination:
binary format control the parameter turned on or off in the program stored in hex mode, the question is:
how to change 39e to 19e using the binary calculation(although i don't know the command for... (2 Replies)
Discussion started by: trynew
2 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I am new to UNIX. I have a text file where each line ends on the hexadecimal character "0A". In the file there are some records that contain the Hex characters "0D0A" which I need to replace by Hex "20".
Is there a simple way to do this?
Regards,
Swanie (3 Replies)
Discussion started by: Swanie
3 Replies
3. Shell Programming and Scripting
i want to output something like
2f 00 00 00
but i can't seem to escape characters like i'm used to in some programming languages, so with this:
echo "/\0\0\0" >> outputfile
i actually get
2f 5c 30 5c 30 5c 30 0a
ie the \0 isn't giving me the 00 i need, and in addition it has got an... (8 Replies)
Discussion started by: peterworth
8 Replies
4. Shell Programming and Scripting
i have a file named tt which has content:
dd=/cc/vv/bb
i want to edit it by a script which will give as follows:
dd=/cc/vv/bb/tt
i tried sed -i -e 's/dd="/cc/vv/bb"/dd="/cc/vv/bb/tt"/' tt
can any one pls help me on this? (1 Reply)
Discussion started by: Aditya.Gurgaon
1 Replies
5. Programming
I am working in C and need a solution for below problem:
I have a binary file, which needs to be edited in such a way no data is loss.
For example i have to insert 3 bytes of data at some position without changing the contents of the file.
if file has data as:... (2 Replies)
Discussion started by: junaid.nehvi
2 Replies
6. Shell Programming and Scripting
Folks,
can anyone help with a script to convert hex to binary digits, and break the 32 bit binary into packs of 4 and send them to 8 different variables.Any help is sincerely appreciated.
Thanks
venu
Its in korn shell...... (24 Replies)
Discussion started by: venu
24 Replies
7. Shell Programming and Scripting
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
8. Shell Programming and Scripting
Assume I have a file \usr\home\\somedir\myfile123.txt
and I want to replace all occurencies of the two (concatenated) hex values x'AD' x'A0' bytwo other (concatenated) hex values x'20' x'6E'
How can I achieve this with the gnu sed tool?
Additional question: Is there a way to let sed show... (1 Reply)
Discussion started by: pstein
1 Replies
9. Shell Programming and Scripting
dHi,
I have the attached file(actual file can be extracted post unzipping it) & i am trying to use the following code for coversion to hex format.
Starting hex value is 84 which is start of the record & termination is done using 00 00 followed by 84(hex) which i can see in the dump clearly using... (14 Replies)
Discussion started by: siramitsharma
14 Replies
10. Shell Programming and Scripting
Hello all,
I have a txt file containing millions of lines. Below is the example:
{tx:be} head -50 file.txt
Instr1: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Instr1:... (6 Replies)
Discussion started by: Zam_1234
6 Replies
LEARN ABOUT OPENSOLARIS
bcleartoh_r
btohex(3TSOL) Trusted Extensions Library Functions btohex(3TSOL)
NAME
btohex, bsltoh, bcleartoh, bsltoh_r, bcleartoh_r, h_alloc, h_free - convert binary label to hexadecimal
SYNOPSIS
cc [flag...] file... -ltsol [library...]
#include <tsol/label.h>
char *bsltoh(const m_label_t *label);
char *bcleartoh(const m_label_t *clearance);
char *bsltoh_r(const m_label_t *label, char *hex);
char *bcleartoh_r(const m_label_t *clearance, char *hex);
char *h_alloc(const unsigned char type);
void h_free(char *hex);
DESCRIPTION
These functions convert binary labels into hexadecimal strings that represent the internal value.
The bsltoh() and bsltoh_r() functions convert a binary sensitivity label into a string of the form:
[0xsensitivity_label_hexadecimal_value]
The bcleartoh() and bcleartoh_r() functions convert a binary clearance into a string of the form:
0xclearance_hexadecimal_value
The h_alloc() function allocates memory for the hexadecimal value type for use by bsltoh_r() and bcleartoh_r().
Valid values for type are:
SUN_SL_ID label is a binary sensitivity label.
SUN_CLR_ID label is a binary clearance.
The h_free() function frees memory allocated by h_alloc().
RETURN VALUES
These functions return a pointer to a string that contains the result of the translation, or (char *)0 if the parameter is not of the
required type.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Obsolete |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe with exceptions |
+-----------------------------+-----------------------------+
The bsltoh(), bcleartoh(), bsltoh_r(), bcleartoh_r(), h_alloc(), and h_free() functions are Obsolete. Use the label_to_str(3TSOL) function
instead.
The bsltoh() and bcleartoh() functions share the same statically allocated string storage. They are not MT-Safe. Subsequent calls to any of
these functions will overwrite that string with the newly translated string. The bsltoh_r() and bcleartoh_r() functions should be used in
multithreaded applications.
SEE ALSO
atohexlabel(1M), hextoalabel(1M),label_to_str(3TSOL), libtsol(3LIB), attributes(5), labels(5)
NOTES
The functionality described on this manual page is available only if the system is configured with Trusted Extensions.
SunOS 5.11 20 Jul 2007 btohex(3TSOL)