Sponsored Content
Top Forums Shell Programming and Scripting number of digits after decimal Post 302567049 by jayan_jay on Saturday 22nd of October 2011 01:32:41 AM
Old 10-22-2011
one more ..
Code:
$ while read i;do echo "scale=7;$i/1" | bc;done<infile

 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

restrain the number of digits of a PID

How is it possible under UNIX to restrain the number of digits of the PID number? For instance, we have a product that generates a PID of 7 digits, and we would like to have only 6 digits maximum instead for the PID. Thank you for your help. (1 Reply)
Discussion started by: mlefebvr
1 Replies

2. Shell Programming and Scripting

Count number of digits in a word

Hi all Can anybody suggest me, how to get the count of digits in a word I tried WORD=abcd1234 echo $WORD | grep -oE ] | wc -l 4 It works in bash command line, but not in scripts :mad: (12 Replies)
Discussion started by: ./hari.sh
12 Replies

3. Shell Programming and Scripting

how to sort date in decimal values uptp two digits

Hi all, there is a data in a file wich loks likes 00:00:49|24.48| 00:01:49|22.83| 00:02:49|22.07| 00:03:49|20.72| 00:04:49|21.28| 00:05:49|21.22| 00:06:49|21.38| 00:07:49|20.93| 00:08:49|21.27| 00:09:49|20.65| 00:10:49|19.42| 00:11:49|21.93| 00:12:49|20.62| 00:13:49|20.23|... (3 Replies)
Discussion started by: jojo123
3 Replies

4. Shell Programming and Scripting

remove directories with two digits after decimal point

Hi everyone, I am new here and generally not experienced with linux. My question must be easy, but as for now I have no idea how to do it. I have lots of directories with numerical names, e.g. 50 50.1 50.12 etc. What I want is to leave directories with no or single digit after the decimal... (2 Replies)
Discussion started by: cabaciucia
2 Replies

5. Shell Programming and Scripting

summing the digits of a binary nuMBER

please help me write a perl program to find the difference of 1 and zeros of a 6 digit binary number. eg If input is 111100 expected output +2 if input is 000011 expected output -2 input is 000111 expected output 0 (2 Replies)
Discussion started by: dll_fpga
2 Replies

6. Shell Programming and Scripting

extracting Number variable and the following digits.

HI all, I have output of something like this: crab: ExitCodes Summary >>>>>>>>> 12 Jobs with Wrapper Exit Code : 50117 List of jobs: 1-12 See https:///twiki/something/ for Exit Code meaning crab: ExitCodes Summary >>>>>>>>> 5 Jobs with Wrapper Exit Code : 8001 List of... (20 Replies)
Discussion started by: emily
20 Replies

7. Shell Programming and Scripting

awk changes to cut number of digits

HCPM1ONDB00014800011800000589009211201 L201307022013070228AUD 00000000031. 000965105800000000000000000000000 MOBITV KEYA ... (4 Replies)
Discussion started by: mirwasim
4 Replies

8. Shell Programming and Scripting

Find number of digits in a word

HI, Can you tell me how to find the number of digits in a word. $cat data.txt +123456ad 87645768 Output should be 6 8 (5 Replies)
Discussion started by: ashwin3086
5 Replies

9. Shell Programming and Scripting

Printing with decimal places from last 4 digits

I have input file like below, 201424|9999|OSS|622010|RGT|00378228764 201424|8888|OM|587079|RGT|00284329675 201424|7777|OM|587076|RGT|00128671024 201424|6666|OM|581528|RGT|00113552084 Output should be like below, should add decimal (.) from last 4 digits. ... (2 Replies)
Discussion started by: vinothsekark
2 Replies
ttk::scale(n)							 Tk Themed Widget						     ttk::scale(n)

__________________________________________________________________________________________________________________________________________________

NAME
ttk::scale - Create and manipulate a scale widget SYNOPSIS
ttk::scale pathName ?options...? _________________________________________________________________ DESCRIPTION
A ttk::scale widget is typically used to control the numeric value of a linked variable that varies uniformly over some range. A scale dis- plays a slider that can be moved along over a trough, with the relative position of the slider over the trough indicating the value of the variable. STANDARD OPTIONS
-class -cursor -style -takefocus See the ttk_widget manual entry for details on the standard options. WIDGET-SPECIFIC OPTIONS [-command command] Specifies the prefix of a Tcl command to invoke whenever the scale's value is changed via a widget command. The actual command consists of this option followed by a space and a real number indicating the new value of the scale. [-from from] A real value corresponding to the left or top end of the scale. [-length length] Specifies the desired long dimension of the scale in screen units (i.e. any of the forms acceptable to Tk_GetPixels). For vertical scales this is the scale's height; for horizontal scales it is the scale's width. [-orient orient] Specifies which orientation whether the widget should be laid out horizontally or vertically. Must be either hori- zontal or vertical or an abbreviation of one of these. [-to to] Specifies a real value corresponding to the right or bottom end of the scale. This value may be either less than or greater than the from option. [-value value] Specifies the current floating-point value of the variable. [-variable variable] Specifies the name of a global variable to link to the scale. Whenever the value of the variable changes, the scale will update to reflect this value. Whenever the scale is manipulated interactively, the variable will be modified to reflect the scale's new value. WIDGET COMMAND
pathName cget option Returns the current value of the specified option; see ttk::widget(n). pathName configure ?option? ?value option value ...? Modify or query widget options; see ttk::widget(n). pathName get ?x y? Get the current value of the -value option, or the value corresponding to the coordinates x,y if they are specified. X and y are pixel coordinates relative to the scale widget origin. pathName identify x y Returns the name of the element at position x, y. See ttk::widget(n). pathName instate statespec ?script? Test the widget state; see ttk::widget(n). pathName set value Set the value of the widget (i.e. the -value option) to value. The value will be clipped to the range given by the -from and -to options. Note that setting the linked variable (i.e. the variable named in the -variable option) does not cause such clipping. pathName state ?stateSpec? Modify or query the widget state; see ttk::widget(n). INTERNAL COMMANDS
pathName coords ?value? Get the coordinates corresponding to value, or the coordinates corresponding to the current value of the -value option if value is omitted. SEE ALSO
ttk::widget(n), scale(n) KEYWORDS
scale, slider, trough, widget Tk 8.5 ttk::scale(n)
All times are GMT -4. The time now is 08:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy