How to get defined precision after arithmetic operation using syncsort?
I have to do some arithmetic operation on Field 8 which is calculated by Field 9/Field 7
Suppose i have data like :
I used following code :
Here i want to maintain 4 precision of unit price field.
COMPRESS is used to compress extra spaces but it also compress zeros of precision.
Can anyone suggest how to get required output.
Last edited by MadeInGermany; 03-16-2018 at 04:11 AM..
Reason: added code tags
I have no idea why I can't get this to work, if anybody can help i would appreciate it.
#!/bin/bash
x=`cat counter.txt | wc -l`
y= '$x / 7'
printf "%d People have visited this page" $y
:confused: (2 Replies)
I am using egrep to extract numbers from a file and storing them as variables in a script. But I am not able to do any arithmetic operations on the variables using "expr" because it stores them as char and not integers. Here is my code and the error I get. Any help will be appreciated.
#!/bin/sh... (3 Replies)
Hi, All,
I have a file, its content is as follows:
100 150
120 135
140 170
I want to insert a column, its content is determined by the difference between the two values in the same line, if the difference is less than 20, the new value is 1, otherwise is 0.
after the operation, the... (1 Reply)
Hi all,
I would appreciate if anyone knows how to perform adding to date.
As for normal date, i can easily plus with any number.
But when it comes to month end say for example 28 Jun, i need to perform a plus with number 3, it will not return 1 Jul.
Thanks in advance for your help. (4 Replies)
Hi
I have a file with 3 columns. say,
infile:
1 50 68
34 3 23
23 4 56
-------
-------
I want to generate n files from this file using a loop so that 1st column in output file is (column1 of infile/(2*n+2.561))
I am doing like this:
for ((i=1; i<=3; i++))
do
a=`echo... (3 Replies)
I am writing a script in zsh shell, it fetchs a number from a file using the awk command, store it as a variable, which in my case is a small number 0.62000. I want to change this number by multiplying it by 1000 to become 620.0 using the command in the script
var2=$((var1*1000))
trouble is... (2 Replies)
input:
Name|Operation
rec_10|1+2+2-
Output:
rec_10|1
Basically I am trying to calculate the result of "the path" in $3 where the operators follow the number and not preceding them like we normally do:
rec_10: +1+2-2=1
But I realise (I am sure there is a good reason for that) that awk... (7 Replies)
Hi,
Here is the script i try to perform arithmetic operation in two variables .
git branch -r | while read brname ; do
REV_COMMITS=`git rev-list --count $brname`
echo "$brname has $REV_COMMITS"
(( TOTAL = TOTAL + REV_COMMITS ))
echo "in loop" $TOTAL
done
echo "total is " $TOTAL
... (3 Replies)
Hi,
I've this following text file
FileVersion = 1.03
Filetype = meteo_on_curvilinear_grid
TIME = 0 hours since 2016-10-03 12:00:00 +00:00
-6.855 -6.828 -6.801 -6.774 -6.747 -6.719 -6.691 -6.663 -6.634 -6.606 -6.577 -6.548 -6.519 -6.489
TIME = 0 hours since... (2 Replies)
Discussion started by: xisan
2 Replies
LEARN ABOUT DEBIAN
oggthumb
OGGTHUMB(1) User Manuals OGGTHUMB(1)NAME
oggThumb - creates thumbnails from an ogg video file
SYNOPSIS
oggThumb [options] file1.ogv [ file2.ogv [ file3.ogv [...] ] ]
DESCRIPTION
oggThumb creates Thumbnails from one or more ogg video files, at a given time position or a given frame number. It is also possible to cre-
ate a series of thumbnails at different time or frame positions. The pictures can be created in JPG or PNG format and can be resized to any
given size.
The default naming of each thumbnail series follows the following rule:
<filename_without_extension>_x.<picture_extension>
Where x starts with 0 and is incremented with every created thumbnail. So the thumbnails are successivly numbered by the appearence order.
This is even valid, if time positions and frame numbers are mixed.
OPTIONS -t Time at which a thumbnail should be created. More than one thumbnail time can be concatenated by commas. The times can be set by
integer or floating point values in seconds. If the time is not exactly matching, the next frame is used. The times don't have to be
sorted incrementally.
Example: -t 12.4,14.157,13.23
-f Number of a frame that should be created as a thumbnail. More than one thumbnail frame can be concatenated by commas. The frame num-
bers must be an integers. The frame numbers don't have to be sorted incrementally.
Example: -f 12000,13000,11000
-s Picture output size. The thumbnail is created in the size given as <width>x<height>. If you want to include the thumbnails into
your webpage and you need to have a fixed width but dynamic height, you can set the dynamic axis to 0. So the aspect ratio of the
video frame is kept. This is the same for setting width or height to 0.
Example: -s 0x100
-o Output format. This can be png or jpg. The default is jpg.
Example: -o png
-n Alternative thumbnail picture name. The % can be used within the name to indicate the counter placeholder.
In case of more than one video file, the counter continuous throughout the different videos, so that the pictures are not overwrit-
ten.
If the name has an extension. This extension is used to identify the output picture format.
Example: -n myNo_%_thumb
EXAMPLE
oggThumb -t 10.3,22.4,31.9,43.4,59.4 -f 1200 -s 0x100 myFile.ogv
oggThumb -f 200,400,300,100 -t 3.54 -n %_thumb.png myfile.ogv mysecondfile.ogv
AUTHOR
Joern Seger <yorn at gmx dot net>
SEE ALSO oggCut(1), oggCat(1), oggJoin(1), oggSplit(1), oggTranscode(1), oggSlideshow(1), oggSilence(1)Linux JAN 2010 OGGTHUMB(1)