9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
im trying to print all lines in the /var/log/syslog file that contain the pattern CRON. and after all the lines have been printed, i want a total of all the lines that contained "CRON" to be printed at the end.
the below command is printing the correct lines, but it is giving me the sum of all... (1 Reply)
Discussion started by: SkySmart
1 Replies
2. Shell Programming and Scripting
Hi Everybody,
I have the following example file...
199|TST-GURGAON|GURGAON|1
199|TST-GURGAON|GURGAON|1
199|TST-GURGAON|GURGAON|1
199|TST-GURGAON|GURGAON|1
199|TST-GURGAON|GURGAON|1
199|TST-GURGAON|GURGAON|1
199|TST-GURGAON|GURGAON|1
199|TST-GURGAON|GURGAON|1
199|TST-GURGAON|GURGAON|1... (8 Replies)
Discussion started by: sraj142
8 Replies
3. Shell Programming and Scripting
File1
0358 Not Visible ***:* NA:NA RDF1+TDEV Grp'd (M) RW 102413
0359 Not Visible ***:* NA:NA RDF1+TDEV N/Grp'd (m) RW -
035A Not Visible ***:* NA:NA RDF1+TDEV N/Grp'd (m) RW -
035B Not Visible ***:* NA:NA ... (2 Replies)
Discussion started by: greycells
2 Replies
4. Shell Programming and Scripting
Hi guys,
I can't find a solution to sum the h:m:s: columns.
28/05/2010 03h 29min 34seg ADSL TELEMAR
28/05/2010 12h 19min 21seg ADSL TELEMAR
29/05/2010 04h 20min 02seg ADSL TELEMAR
29/05/2010 04h 31min 45seg ADSL TELEMAR
30/05/2010 06h 10min 43seg ADSL TELEMAR
Thanks
Use code... (8 Replies)
Discussion started by: ashimada
8 Replies
5. Shell Programming and Scripting
hi all!
I have a space delimited file...
I would like to total column 3 on the condition that column 2 is less than 1030 to a variable in my script
something like this:
TOTAL="`awk '{$2 < 1030} {s+=$3}END{print s}' file`"
Seem to be ignoring the {$2 < 1030}, I'm not sure of the... (3 Replies)
Discussion started by: lyoncc
3 Replies
6. Shell Programming and Scripting
Good afternoon! Im new at scripting and Im trying to write a script to
calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Discussion started by: bigben1220
4 Replies
7. Shell Programming and Scripting
Here is my file name countries
USSR 8650 262 Asia
Canada 3852 24 North America
China 3692 866 Asia
USA 3615 219 North America
Brazil 3286 116 South America
India 1269 637 Asia
Argentina 1072 ... (8 Replies)
Discussion started by: ironhead3fan
8 Replies
8. 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
9. Shell Programming and Scripting
Hi all,
I have a flat file like
10 steven
25 mike
47 Charles
127 Nancy
34 steven
23 mike
67 Charles
7761 Nancy
8 steven
54 mike
88 Charles
1267 Nancy
I need to calculate the total of steven and all the members , for this I am using like
grep "`sed -n 1p patterns.txt`"... (7 Replies)
Discussion started by: senthilkumar_ak
7 Replies