10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
Hi Team,
how can i calculate the number as below in shell script for below expression.
34 /50 * 100 equals to 68%
now how i would represent this in shell script.
Thanks,
Jewel (23 Replies)
Discussion started by: Jewel
23 Replies
3. UNIX for Dummies Questions & Answers
Hey everybody, I've been searching google and these forums and have found some solutions to the issues I've been having today within the OLD Bourne Shell. I am following chapter 6 of the Guide to Unix using Linux 4th Edition.
I am working on some basic calculations with variables in the BASH... (3 Replies)
Discussion started by: mr.rhtuner
3 Replies
4. Shell Programming and Scripting
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)
Discussion started by: senayasma
2 Replies
5. Shell Programming and Scripting
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)
Discussion started by: greycells
2 Replies
6. Shell Programming and Scripting
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)
Discussion started by: harjinder
3 Replies
7. Shell Programming and Scripting
file A
E969K
D223L
E400L
E34L
file B
predicted 3
1 250
251 500
501 1000
The output should be
E969K 501 1000
D223L 1 250
E400L 251 500
E34L 1 250
I tried in this way (1 Reply)
Discussion started by: cdfd123
1 Replies
8. Shell Programming and Scripting
Hi Gurus,
I'm currently using HP-UX B.11.23.
I've a simple calculation script which performs the task below.
-> echo "240021344 / 1024 /1024" | bc
Output: 228
240021344 is KB value.
When I tried to perform the same calculate in Ms Excel, it produces a different result: 228.9021912.... (12 Replies)
Discussion started by: superHonda123
12 Replies
9. UNIX for Dummies Questions & Answers
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)
Discussion started by: knp808
7 Replies
10. Shell Programming and Scripting
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)
Discussion started by: sickboy
4 Replies