Hi,
I wrote this script
awk -F"\t" '{if ((($1 == 586) || ($1 == 68030)) && (($2/1024) < 512)) print $0"\t"(512-($2/1024))"\t"(512-($2/1024))/256}' pcs.txt
But I want from the calculation in red to get rid of the decimal part. Like instead of 1.75 to keep only 1.Please somebody tell me what... (4 Replies)
I am writting a script in the ksh shell and am trying to find a way to report the total execution time of the script without requiring the user to specify the time function when executing the script.
Does anyone have any examples they have used. I have been setting up two date variables (one at... (9 Replies)
Develop a grade calculating program. This program will process all students in the file. This program should neatly display each field of each student's record *and* adds the following items: Course Average and Letter Grade. The course average is calculated by the following weights: 50% for quiz... (7 Replies)
hi
i am writing a progrm to print the even numbers and the code which i am following is as follows
#!/usr/bin/bash
echo "enter a number a"
read a
if
then
echo "the number is even"
else
echo "the number is odd"
fi
~
what is the mistake i am doing ...please tell me (3 Replies)
hello!
I need a date calculation script that need to do that:
./date.sh 20090312
and the script need to give me which day is it for example monday friday or what else!
can anyone help me?? its really urgent :S thx the help! (7 Replies)
Have a bit complicated math query ..
Basically i am given a number which is > 50 ..
I am suppose to find the calculation to get a number which is equal or more than the input number and is also a multiple of any number between 20 - 30 .
For example .
Input number is 60 .
Now 20x3 =60 ... (2 Replies)
I"m trying to calculate the duration of of backup within a ksh shell script but I get an error.
#!/bin/ksh
STTIM=`date '+%T'`
EDTIM=`date '+%T'`
....
....
echo "DURATION OF BACKUP: $((EDTIM - STTIM))" (5 Replies)
Hi All,
I have a text file which is only one column. I want to multiply all these values in file1.txt by 0.01 and get the output.txt
file1.txt
65
85
90
...
output.txt
0.65
0.85
0.90
...
Thanks.
Please use code tags when posting data and code samples! (2 Replies)
Hi
I am trying to calculate the rate at which something is happening.
I have 2 files- a1 and b1.
I want to calculate something like this
((wc -l a1)/(wc -l a1 + wc -l b1))*100 over a loop for different a and b.
Is this possible, help me out fellas.
Thanks a lot :) (5 Replies)
Can such Puzzle solve through UNIX script? if yes, what could be the code?
This has been solve in C language. we were trying to solve this through shell but could not because of not able to pass 1st argument with multiple value. we are not expert in unix scripting. Below is the puzzle
John is a... (4 Replies)
Discussion started by: anshu ranjan
4 Replies
LEARN ABOUT POSIX
vdltodmx
vdltodmx(1) General Commands Manual vdltodmx(1)NAME
vdltodmx - dmx configuration file parser and printer
SYNOPSIS
vdltodmx infile outfile
DESCRIPTION
vdltodmx reads the input file, which should be in VDL configuration file format. After a successful parse, a file in Xdmx configuration
file format is written to the output file.
The VDL file format is used with xmovie, which is available from http://www.llnl.gov/icc/lc/img/xmovie/xmovie.html
EXAMPLE
Given the following VDL-format file:
0
2
#
#
2560 2048 Left two-thirds [restrict=*:2]
2
:2.1 1280 2048 0 0 0 0
:2.2 1280 2048 1280 0 0 0
4
1280 1024 0 0
1280 1024 0 1024
1280 1024 1280 0
1280 1024 1280 1024
#
2560 2048 Right two-thirds [restrict=*:2]
2
:2.2 1280 2048 0 0 0 0
:2.3 1280 2048 1280 0 0 0
4
1280 1024 1280 0
1280 1024 1280 1024
1280 1024 2560 0
1280 1024 2560 1024
the following DMX-format file will be produced:
#
#
virtual "Left two-thirds" 2560x2048 {
display :2.1 1280x2048;
display :2.2 1280x2048 @1280x0;
}
#
virtual "Right two-thirds" 2560x2048 {
display :2.2 1280x2048;
display :2.3 1280x2048 @1280x0;
}
BUGS
If the VDL file is not in the expected format, the program will probably dump core.
SEE ALSO Xdmx(1), xdmxconfig(1), vdl(3), xmovie(1)X Version 11 xorg-server 1.12.4 vdltodmx(1)