Sponsored Content
Full Discussion: AWK and hex sequences
Top Forums Shell Programming and Scripting AWK and hex sequences Post 30116 by JoeTheGuy on Thursday 17th of October 2002 03:32:20 AM
Old 10-17-2002
latest reply

sure. i want to have a simple method of executing the output to an increment of 1 to 256 but in hexidecimal numbers.
My question is how do I on the fly, convert
the ouput of "seq 1 256" to it's corresponding hexadecimal equivalents. that's all I need to know. Not wanting to know how to take a hexdump of a file, or number the lines of a file in hex or anything like that. I merely want to use the bash shell in combination with really whatever has to be used to generate a hexidecimal number sequence of 00 to FF.
If you can help please do so. Thanks for the help by the way. I appreciate it.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Covert Deci to Hex (New to AWK)

Hi, I am very new to awk and would be grateful for your help. I need to convert a file with details like this, Wregister( 45676, 0) Wregister( 55550, 1) Wregister( 44000, 0) FlipFlop( 2342, 2) . . to look like this Wregister(626C, 0) Wregister(D8FE, 1) Wregister(ABE0, 0)... (7 Replies)
Discussion started by: Linda_H
7 Replies

2. Programming

After converting the hexstr to Hex and storing the Hex in a char*

Hi All, My main intension of is to convert the Hexstring stored in a char* into hex and then prefixing it with "0x" and suffix it with ',' This has to be done for all the hexstring char* is NULL. Store the result prefixed with "0x" and suffixed with ',' in another char* and pass it to... (1 Reply)
Discussion started by: rvan
1 Replies

3. Programming

What is the difference between ios::hex and std::hex?

Hi, Is there really a difference between these two, std::hex and ios::hex?? I stumbled upon reading a line, "std::ios::hex is a bitmask (8 on gcc) and works with setf(). std::hex is the operator". Is this true? Thanks (0 Replies)
Discussion started by: royalibrahim
0 Replies

4. Shell Programming and Scripting

awk to remove leading zeros for a hex number

Is it possible by using awk to remove leading zeros for a hex number? ex: 0000000011179E0A -> 11179E0A Thank you! (4 Replies)
Discussion started by: carloszhang
4 Replies

5. UNIX for Dummies Questions & Answers

How to specify a FS as HEX value in AWK

Hi All, I have one input file seperated with Hex decimal B1 value. And i want to process this file. And iam creating an awk script to process this file. How can I specify the Field seperator as HEX B1 in my awk. Please help. Thanks in advance.:) (2 Replies)
Discussion started by: psk_kumar
2 Replies

6. Shell Programming and Scripting

Range of numbers in HEX using AWK

Hi , How do i found out all the number in a range ( HEX) for example Input is 15CF:15D2 Output needed 15CF 15D0 15D1 15D2 Thanks (2 Replies)
Discussion started by: greycells
2 Replies

7. Shell Programming and Scripting

how to get data from hex file using SED or AWK based on pattern sign

I have a binary (hex) file I need to parse to get some data which are encoded this way: .* b4 . . . 01 12 .* af .* 83 L1 x1 x2 xL 84 L2 y1 y2 yL By another words there is a stream of hexadecimal bytes (in my example separated by space for better readability). I need to get value stored in... (3 Replies)
Discussion started by: sameucho
3 Replies

8. Shell Programming and Scripting

awk to compare hex number

$ awk 'BEGIN{ pat111=0x1000000002E3E02; snBegin=0x1000000002E3E01; if (pat111<=snBegin) printf "a\n"}' a Result is not correct. Looks like the number is too big. Any idea? Thx! Please use code tags <- click the link! (2 Replies)
Discussion started by: carloszhang
2 Replies

9. HP-UX

Replacing Hex Characters In A File Using awk?

Hi guys, First off, i'm a complete noob to UNIX and LINUX so apologies if I don't understand the basics! I have a file which contains a hex value of '0D' at the end of each line when I look at it in a hex viewer. I need to change it so it contains a hex value of '0D0A0A' I thought... (10 Replies)
Discussion started by: AndyBSG
10 Replies

10. Shell Programming and Scripting

Print hex Ip address in decimal format inside awk script

Hi to all, May someone help me with the following. The awk script below is part of a bigger awk script, and this part attempts to print an Ip address that is in hex format in decimal format. I'm trying with following code but I'm getting 0.0.0.0 and the correct answer is 192.168.140.100 ... (9 Replies)
Discussion started by: Ophiuchus
9 Replies
Object::Signature(3pm)					User Contributed Perl Documentation				    Object::Signature(3pm)

NAME
Object::Signature - Generate cryptographic signatures for objects SYNOPSIS
# In your module package My::Module use base 'Object::Signature'; # In outside code my $Object = My::Module->new; print "Object Signature: " . $Object->signature; DESCRIPTION
Object::Signature is an abstract base class that you can inherit from in order to allow your objects to generate unique cryptographic signatures. The method used to generate the signature is based on Storable and Digest::MD5. The object is fed to "Storable::nfreeze" to get a string, which is then passed to Digest::MD5::md5_hex to get a unique 32 character hexidecimal signature. METHODS
signature The "signature" method is the only method added to your class, and will generate a unique 32 hexidecimal signature for any object it is called on. SUPPORT
All bugs should be filed via the bug tracker at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Object-Signature <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Object-Signature> For other issues, or commercial enhancement or support, contact the author. TO DO
Incremental Generation Currently has to generate the entire Storable string before digesting it. Would be nice if there was a way to incrementally Storablise and Digest in one pass so that it becomes much more memory efficient for large objects. Strengthen the Digest Algorithm Once the current (as of 2005) hashing controversy settles down, consider selecting a newer and more powerful hashing algorithm to replace MD5. Or offer alternatives depending on how important the security situation is, as MD5 is very fast (90 meg a second) and many more-secure ones are a lot slower (more than 10 times slower in some cases). On our side is the fact we use Storable. It should be much harder to create collisions when you don't control the string, only the structure before it goes through Storable. AUTHOR
Adam Kennedy <adamk@cpan.org> SEE ALSO
Object::Signature::File, <http://ali.as/> COPYRIGHT
Copyright 2004 - 2011 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.12.3 2011-03-24 Object::Signature(3pm)
All times are GMT -4. The time now is 09:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy