This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes retrieve float values from file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "retrieve float values from file" Watch "retrieve float values from file" New topic
Author

retrieve float values from file

Rocky Salve
Greenhorn

Joined: Apr 05, 2006
Posts: 16
can anyone help me to retrieve floating-point values from files using linux scripting for performing arithmetic operations

for ex; in file f1

12.22 22.33 12.32

using script those above value should be retrieved and added
12.22+22.33+12.32
and results stored in other file
Gerardo Tasistro
Ranch Hand

Joined: Feb 08, 2005
Posts: 362
What do you mean by "linux scripting"??

BASH, SH, Perl??? What do you start with and what do you want to end with? Describe your program.
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

if sed and bc is installed, use that:


[ April 15, 2006: Message edited by: Stefan Wagner ]

http://home.arcor.de/hirnstrom/bewerbung
 
 
subject: retrieve float values from file
 
Similar Threads
Submit multipart and form data
how to display negative values within parenthesis using <display:column > ?
Using $ to retrieve value in JavaScript
how to display in swing?
Set and Get the values from the Http Header