LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-15-2010, 05:16 PM   #1
ghantauke
Member
 
Registered: Nov 2010
Posts: 114

Rep: Reputation: 6
awk arithmetic problem


"1/21854 = 1.65414e-05" in awk. I'm having problems with the notation while carring out arithmetic operations on it. Is there a way to get 0.0000165414 as the result instead?
 
Old 11-15-2010, 05:41 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
man awk
/printf



Cheers,
Tink
 
Old 11-15-2010, 05:43 PM   #3
ghantauke
Member
 
Registered: Nov 2010
Posts: 114

Original Poster
Rep: Reputation: 6
Quote:
Originally Posted by Tinkster View Post
man awk
/printf



Cheers,
Tink
AH! how could i forget about the printf Thanks again
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Arithmetic operation with awk fugitive569 Programming 2 12-04-2009 11:10 AM
Simple arithmetic using expr mmahulo Linux - Newbie 8 12-23-2008 02:48 AM
LXer: Convoluted Column Arithmetic Examples Using Awk On Linux Or Unix LXer Syndicated Linux News 0 11-19-2008 01:30 PM
LXer: Simple Arithmetic In Bash, Perl and Awk - More Porting LXer Syndicated Linux News 0 05-28-2008 09:41 AM
Bash arithmetic Blackout_08 Programming 2 06-08-2006 11:37 PM


All times are GMT -5. The time now is 08:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration