Sponsored Content
Top Forums UNIX for Dummies Questions & Answers script for nums in Hexadecimal base Post 9399 by AlvaroD on Friday 26th of October 2001 07:30:11 AM
Old 10-26-2001
Lightbulb script for nums in Hexadecimal base

Hi:

I´ve developed a script that count in decimal base. this is a example:

ini=0
end=0
ini=$1
end=`expr $2+1`
i=$ini
while [ $end \> $i ]
do
..
..
i=`expr $i+1`
done
Could you say me how dou you count in hexadecimal base?


Thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Convert hexadecimal to decimal base

Hello ! Does anyone knows how can I convert hexadecimal to decimal base in the ksh or csh script ?? Thanks ! Witt (1 Reply)
Discussion started by: witt
1 Replies

2. Shell Programming and Scripting

Get Hexadecimal Value

I have a record in a file that ends with the new line character "\n". How dio I determine the hexadecimal value for that? (2 Replies)
Discussion started by: lesstjm
2 Replies

3. Shell Programming and Scripting

need script to convert number in hexadecimal

hi , i need a script to convert number into hexadecimal base for example: 237=>ED it s very important for me thank you in advance for you help (5 Replies)
Discussion started by: mips
5 Replies

4. AIX

Menu base AIX script

Hi, I am trying to create a menu on AIX systen for operators in our office. Please suggest how can I loop back to menu by pressing any key from a online running file. For example I can view the Database alert log file by tail -f command but how should I loop back to menu again. If I press <ctrl... (1 Reply)
Discussion started by: dwiravi
1 Replies

5. Shell Programming and Scripting

Menu Base AIX Script

Hi, I am trying to create a menu on AIX systen for operators in our office. Please suggest how can I loop back to menu by pressing any key from a online running file. For example I can view the Database alert log file by tail -f command but how should I loop back to menu again. If I press <ctrl... (1 Reply)
Discussion started by: dwiravi
1 Replies

6. UNIX for Dummies Questions & Answers

Hexadecimal to Decimal

Hi all, I have a small script to convert my HexaDecimal Input to Decimal as output. #!/bin/ksh hd=00208060 dec=`printf %d $hd` echo $dec Output of the above program: printf: 00208060 not completely converted 16 But my expected output is "2130016". How can i acheive this. I... (2 Replies)
Discussion started by: Arunprasad
2 Replies

7. Programming

Hexadecimal to ascii

Let's suppose i have a hexadecimal array with 16 cells.for example b3e2d5f636111780 i want to convert it to an array of ascii characters(in C) so that i can reduce total size of the file i want to put it in. But i am afraid i have not fully understand the difference between ascii and hex(i... (3 Replies)
Discussion started by: bashuser2
3 Replies

8. Shell Programming and Scripting

Hexadecimal increment using shell script

I am looking for hexadecimal increment by reading user input using shell script. For example the user input is 01A. I want to increase the hex count by 4 times Looking for output: 01A O1B 01C 01D 01E Can someone suggest? (14 Replies)
Discussion started by: sai_1712
14 Replies

9. Red Hat

CentOS 6.1 base install (like FreeBSD base install)?

Hello, What is the simplest way to install CentOS 6.1 with console base-system only using official LiveDVD image on VirtualBox machine? I'd like to get simplest console with network support like FreeBSD base installation. Then, install services which I need. The installer jest extracts the... (2 Replies)
Discussion started by: newbie_develope
2 Replies

10. Shell Programming and Scripting

Generate hexadecimal

Hello I'm working on a script to list all ipv6 from given address so I've run this script which create hex part of ipv6 STR2=159 END2=200 SUM2=`expr $END2 - $STR2` for ((i=STR2;i<=END2;++i)); do x=$( printf "%x" $i ) ; echo $x echo -e "::"$x >> netpart.txt done output is : ::9f... (2 Replies)
Discussion started by: nimafire
2 Replies
PARSE_INI_STRING(3)							 1						       PARSE_INI_STRING(3)

parse_ini_string - Parse a configuration string

SYNOPSIS
array parse_ini_string (string $ini, [bool $process_sections = false], [int $scanner_mode = INI_SCANNER_NORMAL]) DESCRIPTION
parse_ini_string(3) returns the settings in string $ini in an associative array. The structure of the ini string is the same as the php.ini's. PARAMETERS
o $ini - The contents of the ini file being parsed. o $process_sections - By setting the $process_sections parameter to TRUE, you get a multidimensional array, with the section names and settings included. The default for $process_sections is FALSE o $scanner_mode - Can either be INI_SCANNER_NORMAL (default) or INI_SCANNER_RAW. If INI_SCANNER_RAW is supplied, then option values will not be parsed. As of PHP 5.6.1 can also be specified as INI_SCANNER_TYPED. In this mode boolean, null and integer types are preserved when possible. String values "true", "on" and "yes" are converted to TRUE. "false", "off", "no" and "none" are considered FALSE. "null" is converted to NULL in typed mode. Also, all numeric strings are converted to integer type if it is possible. RETURN VALUES
The settings are returned as an associative array on success, and FALSE on failure. NOTES
Note There are reserved words which must not be used as keys for ini files. These include: null, yes, no, true, false, on, off, none. Values null, off, no and false result in "", and values on, yes and true result in "1", unless INI_SCANNER_TYPED mode is used. Char- acters ?{}|&~![()^" must not be used anywhere in the key and have a special meaning in the value. SEE ALSO
parse_ini_file(3). PHP Documentation Group PARSE_INI_STRING(3)
All times are GMT -4. The time now is 10:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy