09-01-2009
You can use bc if your distro supports. And take a look at related posts in this forum.
Hope that helps.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to create a script that will read from a file two non-integer values (decimals) and add those values together. For example, I want to add 1.51 and -2.37 together and get the sum. Any ideas? Thanks! (2 Replies)
Discussion started by: limshady411
2 Replies
2. Shell Programming and Scripting
Hi all,
I have a issue... Is it possible to compare integer value with decimal value.
If it is not possible,then how can i compare 2 decimal values in born shell.thanks! (3 Replies)
Discussion started by: MARY76
3 Replies
3. Shell Programming and Scripting
Hi all,
I'm trying to convert a decimal number into an integer number; I'm doing this:
n=`echo |awk '{ print "'"$mem"'"*10}'`
where the variable mem is equal to 3.7
I'd like to obtain 37, but the expression above gives me 30.
Help please!!!!
thx a lot (4 Replies)
Discussion started by: idro
4 Replies
4. Shell Programming and Scripting
Hi everyone,
I would like to know how to convert an integer to a string. for instance if i=1 i would like to creat a variable called constant1. i want to do this in a for loop so for each value of i, i create a new variable such as constant2, constant3,... and so on.
for i in 1 2 3
do ... (1 Reply)
Discussion started by: ROOZ
1 Replies
5. UNIX for Dummies Questions & Answers
i need to do camparisions like the below.
For the case when first=10 and second=9.9 the scripts displays process failed.
I need to be able to convert the values to integer before doing the comparision.
Like 9.9 should be rounded over to 10 before doing comparision.
Please advice how can... (3 Replies)
Discussion started by: nehagupta
3 Replies
6. Shell Programming and Scripting
From strings stored in variables, I need to isolate and use the first numerical value contained within them. I will need to know how to produce an integer as well as a floating point decimal. It needs to work on any string regardless of what types of characters (if any) are preceding or following... (3 Replies)
Discussion started by: bradlecat
3 Replies
7. Shell Programming and Scripting
Using below command
awk 'NR==FNR{A=$1;next}
{sum+=($2*A)}END{OFMT="%20f";print int(sum)}' Market.txt Product.txt
answer:351770174.00000
how to convert this to 351770174.
when i try with below command i am getting different result.
awk 'NR==FNR{A=$1;next}... (3 Replies)
Discussion started by: katakamvivek
3 Replies
8. Shell Programming and Scripting
I have a function that is supposed to check for user processes and wait for 0 count before exiting the function. I am sure I have more than one issue in my code, but the stumbling block right now is that I am trying to convert the value of my variable from a string to integer.
process_count... (10 Replies)
Discussion started by: MIA651
10 Replies
9. Shell Programming and Scripting
Hi Experts,
Need your advice.
I have a csv file in which column value can contain two integer post decimal(like 1.00, 13.00,12.15, 2.43) or blank.
Tried the below code but not working.
awk -F "|" '{
if ($39 !~ /^+\.{2}$ || $39 != "") {print "165: Quantity decimal values are not correct... (2 Replies)
Discussion started by: as7951
2 Replies
10. Shell Programming and Scripting
Hi guys...
I am loving this integer maths thing.
64 bit systems are certainly easier than 32 bit, but hey, I don't intend to leave out my fav' platform.
Using one of the 'Brothers' methods, URL inside the code.
#!/bin/sh
#
# #!/usr/local/bin/dash
# e_constant.sh
# Brother's formula .
#... (2 Replies)
Discussion started by: wisecracker
2 Replies
LEARN ABOUT DEBIAN
jekyll
JEKYLL(1) User Commands JEKYLL(1)
NAME
Jekyll - is a blogaware, static site generator.
USAGE
jekyll # . -> ./_site
jekyll <path to write generated site>
# . -> <path>
jekyll <path to source> <path to write generated site>
# <path> -> <path>
jekyll import <importer name> <options>
# imports posts using named import script
Configuration is read from '<source>/_config.yml' but can be overridden using the following options:
OPTIONS
--file [PATH]
File to import from
--dbname [TEXT]
DB to import from
--user [TEXT]
Username to use when importing
--pass [TEXT]
Password to use when importing
--host [HOST ADDRESS]
Host to import from
--site [SITE NAME]
Site to import from
--[no-]safe
Safe mode (default unsafe)
--[no-]auto
Auto-regenerate
--server [PORT]
Start web server (default port 4000)
--no-server
Do not start a web server
--base-url [BASE_URL]
Serve website from a given base URL (default '/'
--[no-]lsi
Use LSI for better related posts
--[no-]pygments
Use pygments to highlight code
--rdiscount
Use rdiscount gem for Markdown
--redcarpet
Use redcarpet gem for Markdown
--kramdown
Use kramdown gem for Markdown
--time [TIME]
Time to generate the site for
--[no-]future
Render future dated posts
--permalink [TYPE]
Use 'date' (default) for YYYY/MM/DD
--paginate [POSTS_PER_PAGE]
Paginate a blog's posts
--limit_posts [MAX_POSTS]
Limit the number of posts to publish
--url [URL]
Set custom site.url
--version
Display current version
AUTHOR
This manual page was written by Youhei SASAKI <uwabami@gfd-dennou.org>, for the Debian GNU/Linux system(but may be used by others).
Jekyll 0.11.2 May 2012 JEKYLL(1)