10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I'm looking for a way to do a simple math calc during a shell script as a means of logging how long a particular task takes.
For example...
STARTTIME=whenever this script starts
./path/to/command.sh >>logfile.log
TOTALTIME=<time at this stage of the script after above command... (7 Replies)
Discussion started by: nbsparks
7 Replies
2. Shell Programming and Scripting
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)
Discussion started by: jamie_123
5 Replies
3. 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
4. Shell Programming and Scripting
Hi Gurus,
I am working with a korn shell script to simplify some operations of calculation number of lines inside compressed file.
The called function (inside a cycle) is the following:
#########################################
# F.ne: CheckCount
#########################################... (3 Replies)
Discussion started by: GERMANICO
3 Replies
5. UNIX for Dummies Questions & Answers
Can someone tell me how to change the first column in a very large 17k line file from a random 10 digit numeric value to a non numeric value. The format of lines in the file is:
1702938475,SNU022,201004
the first 10 numbers always begin with 170 (6 Replies)
Discussion started by: Bahf1s
6 Replies
6. 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
7. Shell Programming and Scripting
I am begining to learn bourne shell and as a practice I have written a script which when given the purchase price and percentage of discount calculates the savings.
I somehow cannot figure out why my script fails to do arthimatic calculation on real numbers.
Could anyone look at the script... (5 Replies)
Discussion started by: Tirmazi
5 Replies
8. Shell Programming and Scripting
Hello
I am currently working on a shell script which actually needs to pull some file
from a server ,
The filenames will have the extension with date/time stamp , i need to trim that and name it to proper format
Example :
xyz_20091108_22142365.gzip
i need to remove the... (5 Replies)
Discussion started by: ranga27
5 Replies
9. Shell Programming and Scripting
Hi All,
Is there any code in Perl which can differentiate between numeric and non-numeric input? (11 Replies)
Discussion started by: Raynon
11 Replies
10. Shell Programming and Scripting
please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies