Sponsored Content
Top Forums UNIX for Advanced & Expert Users Converting Binary decimal coded values to Ascii Values Post 302180448 by gaur.deepti on Monday 31st of March 2008 08:46:29 AM
Old 03-31-2008
Hi ,

I have tried the below things but i am getting the output as all numbers


dd if=inputfile of=test.dat ibs=512 cbs=0 conv=ascii
dd conv=ascii | od -c inputfile > test.dat

i am getting the below values

0000140 4149 4c4c 474d 412e 3946 4939 4942 302e
0000160 3630 3133 3930 0333 4500 5888 8e82 eeee
0000200 eeee eeee eeee 0299 0075 0063 0000 3208
0000220 8888 ee73 eeee 0eee 0e0e 300e 0e03 e863

the above values contains varchar and date columns which i am not able to see

pls suggest any other way

Thanks,
Deepti.Gaur
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

unix script for converting a decimal to binary

Could anybody please help me in writing a script in unix for converting a decimal number to binary number. (3 Replies)
Discussion started by: softy
3 Replies

2. UNIX for Advanced & Expert Users

Converting ASCII to Binary mode

Dear All, Business Users are transfering ( FTP ) a CSV file into the IBM AIX box with transfer mode as ASCII. But I want to convert the CSV file from ASCII mode into binary mode, as my script expects file in binary mode. Is it possible to do through Unix commands? Thanks in Advance, RK (1 Reply)
Discussion started by: srajeshmca
1 Replies

3. Shell Programming and Scripting

convert ascii values into ascii characters

Hi gurus, I have a file in unix with ascii values. I need to convert all the ascii values in the file to ascii characters. File contains nearly 20000 records with ascii values. (10 Replies)
Discussion started by: sandeeppvk
10 Replies

4. UNIX for Dummies Questions & Answers

Decimal to BCD (Binary Coded Decimal)

Anybody please help me... Design an algorithm that accepts an input a decimal number and converts it into BCD (Binary Coded Decimal) representation. Also, draw its Flow Chart. This is a unix qn... plz post algorithm for that :confused: (1 Reply)
Discussion started by: caramba
1 Replies

5. Homework & Coursework Questions

Decimal to BCD (Binary Coded Decimal)

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Design an algorithm that accepts an input a decimal number and converts it into BCD (Binary... (2 Replies)
Discussion started by: caramba
2 Replies

6. Shell Programming and Scripting

Converting hex to ascii/decimal

I am writing a bash script to do some parsing on a log and I am running into a problem when it comes to converting only certain sections of the file from hex to ascii or hex to decimal. Data Example: The hex values after Hardware and SW Version I need to convert from Hex to ASCII and the... (16 Replies)
Discussion started by: Shiftkey
16 Replies

7. Shell Programming and Scripting

Converting odd values to even values(or vice-versa) located in a column

Hello All, I have a below data in a .csv file where all rows where col1 is A, col2 is odd numbers, similarly even numbers for all rows where col1 is B. Note that my data has some other columns(not shown here) too (around 100) after col2. Tool,Data A,1 A,3 A,5 .... so on B,2 B,4 .... ... (4 Replies)
Discussion started by: ks_reddy
4 Replies

8. Shell Programming and Scripting

Converting a binary file to ascii and vice versa?

Hi All, I have a binary file which is being exported from a Database, and i need to convert that to ASCII format. How can i achieve that? And this solution should work for any file which is given to us; means they will give different files from different tables. Thanks in advance. (8 Replies)
Discussion started by: baranisachin
8 Replies

9. Shell Programming and Scripting

awk file to read values from Db2 table replacing hard coded values

Hi, I want to replace a chain of if-else statement in an old AWK file with values from Db2 table or CSV file. The part of code is below... if (start_new_rec=="true"){ exclude_user="false"; user=toupper($6); match(user, "XXXXX."); if (RSTART ==2 ) { ... (9 Replies)
Discussion started by: asandy1234
9 Replies
bltocolor(3TSOL)				       Trusted Extensions Library Functions					  bltocolor(3TSOL)

NAME
bltocolor, bltocolor_r - get character-coded color name of label SYNOPSIS
cc [flag...] file... -ltsol [library...] #include <tsol/label.h> char *bltocolor(const m_label_t *label); char *bltocolor_r(const m_label_t *label, const int size, char *color_name); DESCRIPTION
The bltocolor() and bltocolor_r() functions get the character-coded color name associated with the binary label label. The calling process must have PRIV_SYS_TRANS_LABEL in its set of effective privileges to get color names of labels that dominate the cur- rent process's sensitivity label. RETURN VALUES
The bltocolor() function returns a pointer to a statically allocated string that contains the character-coded color name specified for the label or returns (char *)0 if, for any reason, no character-coded color name is available for this binary label. The bltocolor_r() function returns a pointer to the color_name string which contains the character-coded color name specified for the label or returns (char *)0 if, for any reason, no character-coded color name is available for this binary label. color_name must provide for a string of at least size characters. FILES
/etc/security/tsol/label_encodings The label encodings file contains the classification names, words, constraints, and values for the defined labels of this system. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Obsolete | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe with exceptions | +-----------------------------+-----------------------------+ These functions are obsolete and retained for ease of porting. They might be removed in a future Solaris Trusted Extensions release. Use the label_to_str(3TSOL) function instead. The bltocolor() function returns a pointer to a statically allocated string. Subsequent calls to it will overwrite that string with a new character-coded color name. It is not MT-Safe. The bltocolor_r() function should be used in multithreaded applications. SEE ALSO
label_to_str(3TSOL), libtsol(3LIB), attributes(5) NOTES
The functionality described on this manual page is available only if the system is configured with Trusted Extensions. If label includes a specified word or words, the character-coded color name associated with the first word specified in the label encodings file is returned. Otherwise, if no character-coded color name is specified for label, the first character-coded color name specified in the label encodings file with the same classification as the binary label is returned. SunOS 5.11 20 Jul 2007 bltocolor(3TSOL)
All times are GMT -4. The time now is 07:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy