Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 01-09-2003, 06:54 AM   #1
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 549

Rep: Reputation: 30
Bash variables

Hi all!

Does anyone know if there is any other variable in bash, except string ofcourse, which can contain for example the value 1.6 ???

I have to do some calculations with that and dont want to multiply everything with 10.
Old 01-09-2003, 12:21 PM   #2
Senior Member
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 110Reputation: 110
Try the "bc" utility. Example:

bash$ echo "0.5 + 1.6" | bc
Old 01-09-2003, 04:31 PM   #3
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 549

Original Poster
Rep: Reputation: 30
Nop, thats not what i meant. I need it for a monitoring script, to monitor some servers. They don't have bc installed and i really dont want to install it either. The script should run with as less as possible extra programs.


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
(bash) how to list all variables? Duudson Programming 11 03-24-2005 01:35 PM
sed with bash variables MurrayL Linux - Software 2 03-21-2005 09:13 AM
bash variables pfaendtner Linux - Newbie 4 11-23-2004 02:00 PM
variables in bash haddad Linux - General 6 09-22-2004 06:29 PM
Variables in bash tcaptain Programming 1 03-03-2003 03:07 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:01 AM.

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