Sponsored Content
Full Discussion: Alphanumeric to integer
Top Forums Shell Programming and Scripting Alphanumeric to integer Post 302533355 by Corona688 on Thursday 23rd of June 2011 11:40:26 AM
Old 06-23-2011
Is it hexadecimal?

Depending on your shell and system, you may be able to turn it into decimal like

Code:
VAL=1A2
VAL=$((0x${VAL}))

If it's not hexadecimal, you'll need to explain how you want the numbers interpreted, since arbitrary string to integer isn't straightforward.

Last edited by pludi; 06-23-2011 at 01:17 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

matching alphanumeric string

how to match an alphanumeric string like the following. i have to do like the following. if the input line is the data is {clock_91b} i have to replace that with the string was ("clock_91b") i tried like $line =~ s/the data is\s+\{(+)\}/the string was \(\"$1\"\)/ which... (4 Replies)
Discussion started by: sskb
4 Replies

2. Shell Programming and Scripting

sort command - alphanumeric

I have a file I'm trying to sort such as fred1 fred2 fred10 fred11 ... when I sort I get fred1 fred10 fred11 fred2 ... using sort can any give me the syntax to sort this is dict order e.g., (4 Replies)
Discussion started by: gefa
4 Replies

3. UNIX for Dummies Questions & Answers

AlphaNumeric String Operations

Hi :) I am writing a ksh I have a string of general format A12B3456CD78 the string is of variable length the string always ends with numbers (here it is 78.. it can be any number of digits may be 789 or just 7) before these ending numbers are alphabets (here it is CD can even be... (3 Replies)
Discussion started by: lakshmikanth
3 Replies

4. Shell Programming and Scripting

alphanumeric comparision

I have a requirement where I need to check if where r1v07l09ab is a software release. I should always check for this to be true to continue the release deployment because an older release should not be deployed by mistake. I mean only the release greater than the current release should be... (3 Replies)
Discussion started by: rakeshou
3 Replies

5. UNIX for Advanced & Expert Users

alphanumeric Sorting

Hi , I have a requirement where one column have to be sorted (delimiter is pipe) for eg: My input filed is as below 1|FIAT|0010103|23011|01/01/2000|31/12/9999|1.15 2|232|613|1 2|234|743|1 2|234|793|1 2|234|893|1 1|FIAT|0010103|23012|01/01/2000|31/12/9999|1.15 2|230|006|0 2|230|106|0... (9 Replies)
Discussion started by: laxmi131
9 Replies

6. Shell Programming and Scripting

get rid of non-alphanumeric characters

Hi! Could anyone so kindly help me a code to eliminate from a txt file, obtained by collecting and merge several web-page, every word (string) containing non alphabetical, numeric and punctuation character (i.e NON a-zA-Z0-9, underscore and punctuation mark)? Thanks a lot for the help to... (5 Replies)
Discussion started by: mjomba
5 Replies

7. UNIX for Dummies Questions & Answers

Parsing alphanumeric variables

Hi All, I have files with a column which has values and ranges, for example colA colB ERD1 3456 ERD2 ERD3 4456 I want to have the following output colA colB colC ERD1 3456 3456 ERD2 526887 526890 ERD3 4456 4456 Being a newbie to... (2 Replies)
Discussion started by: alpesh
2 Replies

8. UNIX for Dummies Questions & Answers

Sorting of alphanumeric filenames..

Hi All, I want sort following files in ascending order. exp_installer_CC4160-file10.dmp exp_installer_CC4160-file11.dmp exp_installer_CC4160-file12.dmp exp_installer_CC4160-file13.dmp... (3 Replies)
Discussion started by: gramakrishna
3 Replies

9. Shell Programming and Scripting

how to compare string integer with an integer?

hi, how to I do this? i="4.000" if ; then echo "smaller" fi how do I convert the "4.000" to 4? Thanks! (4 Replies)
Discussion started by: h0ujun
4 Replies

10. Shell Programming and Scripting

Trouble with alphanumeric Sort

I have a lot of data that need to be sorted alphanumerically. I began using sort -du and it solved almost all my problems. However, when I encountered files with data like this it began to fail: /vol/close_eng_ice_0888 /vol/open_eng_ice_0890 /vol/open_eng_ice_08923 /vol/open_eng_ice_0893... (6 Replies)
Discussion started by: newbie2010
6 Replies
EDJE_CC(1)							 The edje compiler							EDJE_CC(1)

NAME
edje_cc - an edje compiler SYNOPSIS
edje_cc [OPTIONS] input_file.edc [output_file.edj] DESCRIPTION
edje_cc is a compiler for edje files EXAMPLES
edje_cc -v file.edc OPTIONS
-id image/directory Add a directory to look in for relative path images -fd font/directory Add a directory to look in for relative path fonts -v Verbose output -no-lossy Do NOT allow images to be lossy -no-comp Do NOT allow images to be stored with lossless compression -no-raw Do NOT allow images to be stored with zero compression (raw) -min-quality VAL Do NOT allow lossy images with quality < VAL (0-100) -max-quality VAL Do NOT allow lossy images with quality > VAL (0-100) -Ddefine_val= to CPP style define to define input macro definitions to the .edc source SEE ALSO
edje_decc(1) edje_recc(1) BUGS
Please reports bugs to the Pkg-E Team <pkg-e-devel@lists.alioth.debian.org> AUTHOR
This man page was written by Ronald Claveau for the Debian GNU/Linux system (but may be used by others). 0.5.0.042 Jan 29, 2007 EDJE_CC(1)
All times are GMT -4. The time now is 07:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy