10-26-2001
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
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
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
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
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
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
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
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
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
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
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
LEARN ABOUT DEBIAN
odbcinst
odbcinst(1) UnixODBC Reference odbcinst(1)
NAME
odbcinst - command line tool for batch ODBC configuration
SYNOPSIS
odbcinst action object options
action is one of
-i install a driver or data source
-u uninstall a driver or data source
-q query a list of drivers or data sources present on the system
--version
shows the version number of the program
object is one of
-d an ODBC driver in /etc/odbcinst.ini
-s an ODBC Data Source Name (DSN) in an odbc.ini file.
options are zero or more of
-f template file
Used with -i, this option specifies a template file containing the driver or DSN to be installed.
-r Read the template from standard input.
-n Driver/Data Source Name
Used with -u to specify a driver or DSN to remove.
-v Contrary to standard practice, this turns off verbose output; there is no output, even for errors.
-l The specified Data Source object is a System DSN, in /etc/odbc.ini.
-h The specified Data Source object is a User DSN, in the current user's $HOME/.odbc.ini. This is the default with -s.
DESCRIPTION
odbcinst updates the configuration files that control ODBC access to database servers on the current host. It also maintains in
/etc/odbcinst.ini a count of the number of references to a particular driver, which can be used to determine whether it should be removed
from the file (only when the reference count drops to 0).
Installing
Drivers and DSNs are installed using the -i option.
If the object to be installed is a driver (-d), the specified driver is added to /etc/odbcinst.ini or its reference count is incremented if
it is already there.
If the object is a data source (-s), the data source is added either to /etc/odbc.ini (if -l is used) or to $HOME/.odbc.ini (the default,
which can also be specified with -h).
Uninstalling
Uninstalling a driver is done with the command odbcinst -u -d -n driver name. Uninstalling a DSN is done with the command odbcinst -u -s
-n data source name. Uninstalling causes the reference count on the object to be decremented. If nothing else has requested this driver
or DSN (i.e., the reference count drops to zero), it is removed from the config file.
The options -l and -h are used with -s to specify which odbc.ini file to configure.
Queries
The command odbcinst -q -d returns a list of all drivers present in /etc/odbcinst.ini. The command odbcinst -q -s returns a list of all
system and user DSNs available.
EXIT STATUS
0 Success
non-zero
Failure
TEMPLATE FILES
A typical driver template looks like this:
[MySQL]
Description = MySQL driver
Driver = /usr/lib/odbc/libmyodbc.so
Setup = /usr/lib/odbc/libodbcmyS.so
A DSN template looks like this:
[Sample DSN]
Description = Test MySQL connection
Driver = MySQL
Trace = Yes
TraceFile = /tmp/odbc.log
Database = junk
Server = localhost
Port = 3306
Socket =
The Description and Driver fields should be present in all DSN configurations. Other options are driver-specific; consult your ODBC
driver's documentation for a list of allowed options, or see ODBCConfig(1) for a graphical tool that can be used to interactively set up a
DSN or driver the first time.
FILES
/etc/odbcinst.ini, /etc/odbc.ini, $HOME/.odbc.ini
AUTHOR
This manual page was written by Oliver Elphick <olly@lfix.co.uk> and Steve Langasek <vorlon@debian.org> for the Debian package of unixODBC.
SEE ALSO
ODBCConfig(1), gODBCConfig(1)
UnixODBC 2nd Mar 2002 odbcinst(1)