Sponsored Content
Top Forums Shell Programming and Scripting Bash Decimal Addition using bc Post 302478354 by vb615 on Tuesday 7th of December 2010 06:25:46 PM
Old 12-07-2010
awesome that works. Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to sort decimal values in bash

Hi, I have a list of values from associative array from 0,..till 1.0000. I tried various sort options; sort -g, sort -nr but it still couldnt work. In other words, the numbers are not sorted accordingly. Please help. Thanks. (1 Reply)
Discussion started by: ahjiefreak
1 Replies

2. Shell Programming and Scripting

having a bash script convert ft to meters with 1 decimal

What is the correct syntax to limit the number of decimals to 1 or 0 in a bash script? Here is the partial code I have which works, but if I echo $meters, it has 4 or 5 decimals: METERS=`echo "$FEET * 0.3048" | bc` I read about scale and length in the bc man page, but I can't seem to get the... (2 Replies)
Discussion started by: audiophile
2 Replies

3. Shell Programming and Scripting

[bash]printf octal instead of decimal

Hello everybody, I would like to understand why the printf function is returning me an octal value with this command : printf %4.4d 0010 returns 0008 printf %4.4d 10 returns 0010 Thanks for help. (3 Replies)
Discussion started by: dolphin06
3 Replies

4. Shell Programming and Scripting

incremental addition of hex decimal number in one field

Hi I want to incremental add hex decimal number to a particula field in file eg: addr =123 dept1=0 addr = 345 dept2 =1 addr2 = 124 dept3 =2 . . . . . . addr3 =567 dept15 =f Is there any command which add... (8 Replies)
Discussion started by: diddi_linux
8 Replies

5. Shell Programming and Scripting

addition of decimal no

a=10.00 pattern=-11.00 b=`echo "$a $pattern" | awk ' printf("%d\n", $1 + $2)'` echo $b not working, also trined bc ,dc but thats not on my m/c. also expr not supporting. any clue? (6 Replies)
Discussion started by: saluja.deepak
6 Replies

6. Shell Programming and Scripting

bin bash decimal compare

I need decimal comparing with if. Check if apache version is less than 2.2.17. I tried this and not working. #!/bin/bash apachever=`/usr/local/apache/bin/httpd -v | head -1 | awk '{print $3}' |cut -d/ -f 2` if ]; then echo "Apache version less than 2.2.17" else ... (7 Replies)
Discussion started by: anil510
7 Replies

7. Shell Programming and Scripting

Addition to Bash shell script that emails final output as attachement?

Greetings. I have a nice bash shell script that runs a multi-step analysis well. I already have the SGE options set up to email me the progress of the run (started, completed, aborted), but a final step would be to code the shell script to email the final output (a .txt file) to the same email... (6 Replies)
Discussion started by: Twinklefingers
6 Replies

8. Shell Programming and Scripting

Bash Rounding to 2 decimal places

I have a number in a bash variable n, and want to round it to 2 decimal places. How can I do that? n=0.0867268 Need to have num=0.09 (1 Reply)
Discussion started by: kristinu
1 Replies

9. Shell Programming and Scripting

How to compare decimal values in bash?

Hi, I am facing some error while doing the comparision between 2 decimal values in bash. Pl help me out. I have tried using below scripts. But its giving me error. 1)amt=12.3 opn_amt=12.5 var=$(awk 'BEGIN{ print "'$amt'"<"'$opn_amt'" }') if ;then echo "correct" else echo "Wrong"... (3 Replies)
Discussion started by: Siba Tripathy
3 Replies

10. UNIX for Beginners Questions & Answers

Read a file with decimal numbers in bash

Hello, I have the following script while read id fraction do sambamba -h -f bam -t 10 --subsampling-seed=50 -s $frac ${id}.bam -o ${id}.out.bam done < fraction.txt where fraction.txt has two columns (id,fraction) and 50 rows I am unable to run this as bash is not able to read the second... (2 Replies)
Discussion started by: nans
2 Replies
AWESOME(1)																AWESOME(1)

NAME
awesome - awesome window manager SYNOPSIS
awesome [-v | --version] [-h | --help] [-c | --config FILE] [-k | --check] DESCRIPTION
awesome is a window manager for X. It manages windows in different layouts, like floating or tiled. Any layout can be applied dynamically, optimizing the environment for the application in use and the task currently being performed. In a tiled layout, windows are managed in a master and stacking area. The master area contains the windows which currently need the most attention, whereas the stacking area contains all other windows. In a floating layout windows can be resized and moved freely. Dialog windows are always managed as floating, regardless of the layout currently applied. The spiral and dwindle layouts are special cases of the tiled layout where the stacking area is arranged in a spiral for the former or as a rectangular fractal for the later. Windows are grouped by tags in awesome. Each window can be tagged with one or more tags. Selecting certain tags displays all windows with these tags. awesome can contain small wiboxes which can display anything you want: all available tags, the current layout, the title of the visible windows, text, etc. OPTIONS
-v, --version Print version information to standard output, then exit. -h, --help Print help information, then exit. -c, --config FILE Use an alternate configuration file instead of $XDG_CONFIG_HOME/awesome/rc.lua. -k, --check Check configuration file syntax. DEFAULT MOUSE BINDINGS
Navigation Button1 on tag name View tag. Button4, Button5 on tag name Switch to previous or next tag. Button4, Button5 on root window Switch to previous or next tag. Button1, Button3, Button4, Button5 on layout symbol Switch to previous or next layout. Layout modification Mod4 + Button1 on tag name Tag current client with this tag only. Mod4 + Button3 on tag name Toggle this tag for client. Button3 on tag name Add this tag to current view. Mod4 + Button1 on client window Move window. Mod4 + Button3 on client window Resize window. DEFAULT KEY BINDINGS
Window manager control Mod4 + Control + r Restart awesome. Mod4 + Shift + q Quit awesome. Mod4 + r Run prompt. Mod4 + x Run Lua code prompt. Mod4 + Return Spawn terminal emulator. Mod4 + w Open main menu. Clients Mod4 + Shift + r Redraw the focused window. Mod4 + m Maximize client. Mod4 + n Minimize client. Mod4 + Control + n Restore client. Mod4 + f Set client fullscreen. Mod4 + Shift + c Kill focused client. Mod4 + t Set client on-top. Navigation Mod4 + j Focus next client. Mod4 + k Focus previous client. Mod4 + u Focus first urgent client. Mod4 + Left View previous tag. Mod4 + Right View next tag. Mod4 + 1-9 Switch to tag 1-9. Mod4 + Control + j Focus next screen. Mod4 + Control + k Focus previous screen. Mod4 + Escape Focus previously selected tag set. Layout modification Mod4 + Shift + j Switch client with next client. Mod4 + Shift + k Switch client with previous client. Mod4 + o Send client to next screen. Mod4 + h Decrease master width factor by 5%. Mod4 + l Increase master width factor by 5%. Mod4 + Shift + h Increase number of master windows by 1. Mod4 + Shift + l Decrease number of master windows by 1. Mod4 + Control + h Increase number of columns for non-master windows by 1. Mod4 + Control + l Decrease number of columns for non-master windows by 1. Mod4 + space Switch to next layout. Mod4 + Shift + space Switch to previous layout. Mod4 + Control + space Toggle client floating status. Mod4 + Control + Return Swap focused client with master. Mod4 + Control + 1-9 Toggle tag view. Mod4 + Shift + 1-9 Tag client with tag. Mod4 + Shift + Control + 1-9 Toggle tag on client. Mod4 + Shift + F1-9 Tag marked clients with tag. CUSTOMIZATION
awesome is customized by creating a custom $XDG_CONFIG_HOME/awesome/rc.lua file. SIGNALS
awesome can be restarted by sending it a SIGHUP. SEE ALSO
awesomerc(5) awesome-client(1) BUGS
Of course there's no bug in awesome. But there may be unexpected behaviors. AUTHORS
Julien Danjou <julien@danjou.info[1]> and others. WWW
http://awesome.naquadah.org NOTES
1. julien@danjou.info mailto:julien@danjou.info 07/16/2012 AWESOME(1)
All times are GMT -4. The time now is 10:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy