how to convert char to num


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to convert char to num
# 1  
Old 09-11-2005
Power how to convert char to num

how to convert char to num or visa versa
i am a beginner how to do it can someone guide me please
# 2  
Old 09-11-2005
Ususally in a script you don't need to.
# 3  
Old 09-12-2005
MySQL

if you are speaking of "C" there you have functions
itoa and atoi to do the conversion Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

error: invalid conversion from ‘const char*’ to ‘char*’

Compiling xpp (The X Printing Panel) on SL6 (RHEL6 essentially): xpp.cxx: In constructor ‘printFiles::printFiles(int, char**, int&)’: xpp.cxx:200: error: invalid conversion from ‘const char*’ to ‘char*’ The same error with all c++ constructors - gcc 4.4.4. If anyone can throw any light on... (8 Replies)
Discussion started by: GSO
8 Replies

2. Shell Programming and Scripting

need to convert a decimal value to an ascii char with awk for the field delimiter

Hello, I need an awk script to receive a variable that's an decimal value such as 009 or 031 and then convert this value to an ascii character to use as the FS (field separator for the input file). For example, 009 should be converted to an ascii tab 031 should be converted to an ascii... (1 Reply)
Discussion started by: script_op2a
1 Replies

3. UNIX for Advanced & Expert Users

Set Caps and Num lock from within X?

Hello, Not sure if this is the right place to post it but.. I have a requirement to set Caps lock and/or Num lock on and off via a Cron job. Now I have working scripts that do the job, but as soon as X starts up the jobs no longer run (well they appear to, but Caps lock and Num lock do not... (0 Replies)
Discussion started by: autotuner
0 Replies

4. Programming

Adding a single char to a char pointer.

Hello, I'm trying to write a method which will return the extension of a file given the file's name, e.g. test.txt should return txt. I'm using C so am limited to char pointers and arrays. Here is the code as I have it: char* getext(char *file) { char *extension; int i, j;... (5 Replies)
Discussion started by: pallak7
5 Replies

5. UNIX for Dummies Questions & Answers

X num of lines before and after

I have a slew of files for historical reference. Each file has a unique line in the file, such as "Today's datetime is:" Each file also contains a unique set of characters on line X, such as "DMX Info." This line number will be different each time a new file is generated. So, for one... (7 Replies)
Discussion started by: jjp
7 Replies

6. Shell Programming and Scripting

Port num incrementing

Hello Guyz These days Iam doing pretty good scripting work that is all because of you fellas.Thank you so much. As it goes ,here comes my next problem.Iam trying to implement automatic port number incrementing. For ex: demo() { echo "Enter for default port: read port ... (5 Replies)
Discussion started by: coolkid
5 Replies

7. Shell Programming and Scripting

tracking sequence num

I have files coming to an input directory every few mins...eg test_00012.txt test_00013.txt test_00014.txt I need to write a script to monitor these and if a file is missing from the sequence I need my script to spot this so I can alert someone... ie... if I got the following:... (1 Reply)
Discussion started by: frustrated1
1 Replies

8. Shell Programming and Scripting

Convert Char to Dec using AWK

I'm facing a problem when trying to read a file and convert the content from char to decimal in ASCII. :confused: eg :- Input file : 20051231 8.00 experted result : 50484853495051493256464848 The content of input file is vary very day. I need to use AWK script to program it. Pls... (4 Replies)
Discussion started by: jasmine05
4 Replies

9. UNIX for Dummies Questions & Answers

setting num lock on at boot up

Once I knew how to set up a unix file so that the num lock would automatically be on after booting up. How exactly is that done? Unix has final control on the setting of the num lock from off or on to on at the end of the boot up process. Any help will be appreciated, especially if detailed. Oh... (0 Replies)
Discussion started by: jddxxx
0 Replies
Login or Register to Ask a Question