Sponsored Content
Top Forums Programming how to check whether given numbe ris hex or not Post 302243639 by otheus on Monday 6th of October 2008 08:06:44 AM
Old 10-06-2008
All numbers are (normally) represented internally as binary objects. Do you mean you have a particular string that you want to parse? And you want to know if this string is hex? Or do you just want to parse any string -- decimal or hex -- into the proper internal representation?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Ascii To Hex

How will I display on screen a UNIX ascii file with its HEX equivalent. I want to check whether 0D 0A is coming at the end of the file which I am generating from UNIX. (1 Reply)
Discussion started by: augustinep
1 Replies

2. UNIX for Dummies Questions & Answers

Calculation - Result not accurate if numbe too big

Dear all, Below is my script, totalCount=57006427 totalSummCount=1207590 let percentageSumTmp1=${totalCount}-${totalSummCount} let percentageSumTmp2=${percentageSumTmp1}*100 The expected result for percentageSumTmp2 should be (5579883700), but when I execute the script in unix env i... (3 Replies)
Discussion started by: epall
3 Replies

3. Shell Programming and Scripting

Looking for a hex character?

Hi guys , i would want to count the concurrences of the 0A hex char in a text file , then if no matches i need to add a 0A at the end of the line. Any ideas? thx.Regards (1 Reply)
Discussion started by: Klashxx
1 Replies

4. UNIX for Dummies Questions & Answers

Hex editing

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

5. Shell Programming and Scripting

hex to decimal

hi all, echo "ibase=16;obase=10;11" | bc shouldn't i get 17? i am getting 11 i am trying to convert 11 (hex) to decimal stuck! JAK (4 Replies)
Discussion started by: jakSun8
4 Replies

6. 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

7. Programming

ascii to hex

Hello guys, i want to convert a text file to hex and have written this code : int main(int argc, char **argv) { ifstream file; string fileName = "CODEZ"; file.open(fileName.c_str()); // oeffen im Text-Modus if(file) {... (5 Replies)
Discussion started by: Kingbruce
5 Replies

8. UNIX for Advanced & Expert Users

Linux RIS server installation

Hi, I'm Samir and I'm new here, actually I'm facing a problem, I'm trying to configure a Linux RIS (Remote Installation Server) to drive windows installation from a Linux RHEL5 I got a guide to do that and followed precisely, I am getting this error message in the client side Setup cannot... (2 Replies)
Discussion started by: samir82show
2 Replies

9. 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

10. Shell Programming and Scripting

How to replace with "sed" some hex values by other hex values?

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
PRIME(1SSL)							      OpenSSL							       PRIME(1SSL)

NAME
openssl-prime, prime - compute prime numbers SYNOPSIS
openssl prime [-help] [-hex] [-generate] [-bits] [-safe] [-checks] [number...] DESCRIPTION
The prime command checks if the specified numbers are prime. If no numbers are given on the command line, the -generate flag should be used to generate primes according to the requirements specified by the rest of the flags. OPTIONS
[-help] Display an option summary. [-hex] Generate hex output. [-generate] Generate a prime number. [-bits num] Generate a prime with num bits. [-safe] When used with -generate, generates a "safe" prime. If the number generated is n, then check that (n-1)/2 is also prime. [-checks num] Perform the checks num times to see that the generated number is prime. The default is 20. COPYRIGHT
Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>. 1.1.1a 2018-12-18 PRIME(1SSL)
All times are GMT -4. The time now is 06:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy