![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| After converting the hexstr to Hex and storing the Hex in a char* | rvan | High Level Programming | 1 | 08-09-2009 11:18 PM |
| Adding a single char to a char pointer. | pallak7 | High Level Programming | 5 | 12-06-2008 11:46 PM |
| How to replace any char with newline char. | mightysam | Shell Programming and Scripting | 5 | 09-18-2008 09:15 PM |
| Perl code to differentiate numeric and non-numeric input | Raynon | Shell Programming and Scripting | 11 | 08-04-2007 11:32 AM |
| How to check a column contain numeric or char data type ?? | jambesh | Shell Programming and Scripting | 12 | 10-06-2006 11:37 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Converting Char to Numeric
HI, Here I have the following output and want to do some mathematical calculation on C2 & C3 column. Code:
c1 c2 c3 c4 c5
l1 1-oct 12:30:01 12:35 abc xyz
l2 1-oct 14:20:01 14:35 def pqr
l3 2-oct 23:50:01 00:05 ghi mno
O/p I need as two column inserted in-between the above o/p. i have 50 records like this. C1 C2 C3 C3-C2 C3(l2) - C3(l1) C4 C5 But when I use SET command it is treating the values as character & I am not able to do any operation. echo `expr $3 - $2` expr: non-numeric argument So do we have any other command which can help me in this process or any cmd by which I can convert it to numeric value. Last edited by jim mcnamara; 10-02-2009 at 07:11 AM.. Reason: code tags |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|