Hi, I wrote a short script for simple text file processing in bash (using "<" for input redirection and "read"). I know, there are probably better tools to do it, but the only thing I can rely on being installed on target comp is really bash and nothing more (no bc, sed, awk, etc.) so I must use only its built-in functions.
Everything would be OK, if there were only positive integer numbers in that input file. Unfortunatelly, there are also decimal and exponential numbers (like 123.456 or 1.23456e+02) which my script must process. Now I'm pretty deadlocked because too late I realised that very basic math functions of bash can not handle such numbers. Now what to do? Are there some functions, which would implement basic math with real numbers in bash (add, substract, multiply, divide and round would be enough)? The idea of writing them myself really scares me... Jarry -- 10 GB Mailbox, 100 FreeSMS/Monat http://www.gmx.net/de/go/topmail +++ GMX - die erste Adresse für Mail, Message, More +++ -- gentoo-user@gentoo.org mailing list