10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to use awk to calculate the average of all lines in $2 for every file in a directory. The below bash seems to do that, but I cannot figure out how to capture the string before the _ as the output file name and have it be tab-delimeted. Thank you :).
Filenames in... (3 Replies)
Discussion started by: cmccabe
3 Replies
2. Shell Programming and Scripting
I want to calculate the average line by line of some files with several lines on them, the files are identical, just want to average the 3rd columns of those files.:wall:
Example file:
File 1
001 0.046 0.667267
001 0.047 0.672028
001 0.048 0.656025
001 0.049 ... (2 Replies)
Discussion started by: AriasFco
2 Replies
3. Shell Programming and Scripting
OK, here is the output from a cron I have here:
FULL OUTPUT:
acoxxx Lastlogin= 2010/07/15 13:10
db2t Lastlogin= 2010/07/16 13:09
db2tadm Lastlogin= 2010/07/20 13:09
eisuser Lastlogin= 2010/07/20 11:53
israel Lastlogin= 2010/07/10 11:42
nmon Lastlogin= 2010/07/05 12:55
norbac Lastlogin=... (4 Replies)
Discussion started by: iga3725
4 Replies
4. Shell Programming and Scripting
I know there have been a million questions regarding calculating time stamps, and with enough googling, I think I'm almost there (I'm going to use the changing the times into seconds and subtracting solution). My problem is that I'm not sure how to format my log file to get the info I need. Below... (0 Replies)
Discussion started by: DeCoTwc
0 Replies
5. Shell Programming and Scripting
Is there any awk command to calculate P Value ?(Probability)
Is it possib;e to calculate P va;ue for this data for ex?
7.891284
8.148193
7.749575
7.958188
7.887702
7.714877
8.141548
7.51845
8.27736
7.929853
7.92456
8.249126
7.989113
8.012573
8.351206 (2 Replies)
Discussion started by: stateperl
2 Replies
6. Solaris
root@erpdevserver $ vxassist -g devdg maxsize
Maximum volume size: 55207936 (26957Mb)
This is the output in vxvm(3.1).. my question is
how we can calculate this bytes(55207936) in to MB(output=26957) or in GB.plz tell how to calculate (2 Replies)
Discussion started by: tv.praveenkumar
2 Replies
7. Shell Programming and Scripting
Hi
First field is the Record Type. A Record Type 5 can have multiple Record Type 6's before another Record Type 5 appears.
I want to calculate the total of fields at position 8-11 on Record type 6 when Record Type 5 has a field at position 11-14 equals to '2222'. then it should delete the lines... (2 Replies)
Discussion started by: appsguy616
2 Replies
8. Shell Programming and Scripting
hi all
Am new to scripting...
So,i have a file named file1 its contents are as follows:
joy 55 66 77
ruby 77 88 99
saloni 88 44 33
I would require a script which will calculate its percentage,its total and the average with awk script
Many thanks in advance..
Please reply me at... (4 Replies)
Discussion started by: whizkidash
4 Replies
9. Shell Programming and Scripting
I was wondering can anyone give me a clue how to start script which would do the following:
I have 2 numbers as input for example: 100 and 1000 and I need to create file and in that file should be written
100 - 199
200 - 299
300 - 399
400 - 499
500 - 599
600 - 699
700 - 799... (3 Replies)
Discussion started by: amon
3 Replies
10. Shell Programming and Scripting
Hi,
I have below awk statement and I need to convert the second field ( substr($0,8,6))from minutes to hours with 2 decimail place. How can I achieve this?
/usr/bin/awk '{print substr($0,23,4),substr($0,8,6)}' /tmp/MANAGER_LIST.$$ >> /tmp/NEWMANAGER_LIST.$$
Thanks for any help! (4 Replies)
Discussion started by: whatisthis
4 Replies