11-07-2008
decimal to hexadecimal coversion continued
Hi,
I would like to build on this example. How would I take the value from that hexadecimal conversion and store it in a variable. For example, I have a script that does the following:
echo "Please enter how many cycles you would like to run :\c"
read cycles
let input=$cycles/8
echo $input
I would like to convert "$input" to a hexadecimal value, then store it in a new variable so I can use the hex converted value in my program. Any pointers on how to do that? Thanks in advance
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
do
..
..
i=`expr $i+1`
done
Could you say me how dou you count in hexadecimal base?
Thanks (1 Reply)
Discussion started by: AlvaroD
1 Replies
2. 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
3. Shell Programming and Scripting
Could anyone tell me how to write a C shell script according to the following requirement.
Write a C shell script convertmin which will read in a number, thought of as representing minutes, and print out the number of hours/minutes it represents so:
Note: you are required to check exception... (1 Reply)
Discussion started by: Ringo
1 Replies
4. Shell Programming and Scripting
Hello Experts,,
I m facing a problem as follows.. need help..
When I am giving the below command it gives me three digit hexadecimal number , for ex :-
printf("%0.3x", 10);
Output: 00a
But I want the same for signed number also.
Now when I am specifiying the... (10 Replies)
Discussion started by: user_prady
10 Replies
5. Shell Programming and Scripting
Hi,
I would like test if a number (with 2 digit, for example a9 , 0b ) is a hexadecimal number with 2 digit ? (2 Replies)
Discussion started by: francis_tom
2 Replies
6. Shell Programming and Scripting
I have a text file of alphanumeric values listed one by one. I have to convert them to hexadecimal equivalents for each character seperated by ":" in Unix bash shell script. For example, 12345678 has to be converted to 31:32:33:34:35:36:37:38 (10 Replies)
Discussion started by: mathie
10 Replies
7. Shell Programming and Scripting
hi all,
this is my script:
#! /bin/sh
minutes=$( { i2cget -f -y 0 0x51 3; } 2>&1 )
minutes=${minutes:2}
hour=$( { i2cget -f -y 0 0x51 4; } 2>&1 )
hour=${hour:2}
day=$( { i2cget -f -y 0 0x51 5; } 2>&1 )
day=${day:2}
month=$( { i2cget -f -y 0 0x51 7; } 2>&1 )
month=${month:2}
... (6 Replies)
Discussion started by: enaud
6 Replies
8. Shell Programming and Scripting
Hello,
i'm trying to write a script sh to convert the rights of a folder or file in a number.
Explain:
ls -l = rwxrwxrwx
so i must display 777.
Do you known where i can find so convert script
Thanks
Use code tags, thanks. (11 Replies)
Discussion started by: steiner
11 Replies
9. Shell Programming and Scripting
I have a lot number audio files in the MP3 proprietary format, I want to convert them to 'opus' the free and higher quality format, with keep metadata also.
My selection command-line programs are SoX (Sound eXchange) for convert MP3 files to 'AIFF' format in order to keep quality and metadata*... (1 Reply)
Discussion started by: temp-usr
1 Replies
10. UNIX for Dummies Questions & Answers
Hi All,
cat filename | awk '{print $1, $2, $4, $5, $6, $7, $8, $9, $10;}' | awk 'NF > 0'
OUTPUT:
2015-01-19 00:12:32 00000000fbfa0000 000000009ae5cf80 014d 015d 0017 003c 0362de20
2015-01-19 00:13:52 00000000fc820000 00000000994c6758 014c 015d 000b 003c 08670250
2015-01-19 00:14:25... (12 Replies)
Discussion started by: sam@sam
12 Replies
LEARN ABOUT DEBIAN
clamav-unofficial-sigs
clamav-unofficial-sigs(8) SCRIPT COMMANDS clamav-unofficial-sigs(8)
NAME
clamav-unofficial-sigs - Download, test, and install third-party ClamAV signature databases.
SYNOPSIS
clamav-unofficial-sigs [options]
DESCRIPTION
clamav-unofficial-sigs is a shell script that updates the Sanesecurity, SecuriteInfo, MalwarePatrol, OITC, INetMsg and ScamNailer third-
party signature databases for ClamAV.
OPTIONS
This script follows the standard GNU command line syntax. A summary of the options is shown below.
-b Add a bypass signature entry to local.ign in order to temporarily resolve a false-positive issue with a third-party signature. The
script will monitor any entries it makes to local.ign and will automatically remove bypass entries if either the original signature
has been modified or removed from the database.
-c FILE-NAME
Source configuration information from a different file.
-d Decode a hexadecimal encoded string or an individual ClamAV 3rd-party signature for viewing. This will not decode image signatures
nor the official signatures.
-e Encode a entire input string in hexadecimal for signature usage in any *.ndb database.
-f Encode a formated input string in hexadecimal that contains spacing field '{}, (), *', without encoding the spacing fields, for sig-
nature usage in any '*.ndb' database.
-g FILE-NAME
Verify the GPG signature for a specific SaneSecurity database file. Only specify the filename as listed in the configuration file
and the script will search for it in the work directory.
-h Print the script help and usage information.
-i Print system and script configuration information.
-m Make a hexadecimal signature database file (*.ndb) from a clear text ascii file. Provides support for both full and formatted sig-
natures. Additional information is provided when using the flag.
-r Remove the clamav-unofficial-sigs script and all of its associated files, databases and work directories from the system.
-s FILE-NAME
Test the integrity of a third-party signature database with clamscan. Only specify the filename as listed in the configuration file
and the script will search for it in the work directory.
-t If HAM directory scanning is enabled in the script's configuration file, then output the names of any third-party signatures that
triggered during the HAM directory scan.
-v Print the script version and date information.
SEE ALSO
clamd(8), clamscan(1)
COPYRIGHT
Bill Landry <bill@inetmsg.com>
LICENSE
BSD (Berkeley Software Distribution)
BUGS
Report bugs to Bill Landry <bill@inetmsg.com>
AUTHOR
Bill Landry <bill@inetmsg.com>
Version 3.7.1 June 6, 2010 clamav-unofficial-sigs(8)