LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Closed Thread
  Search this Thread
Old 12-22-2012, 08:46 AM   #1
eyadgh
Member
 
Registered: Dec 2012
Posts: 40

Rep: Reputation: Disabled
help me please


I have this file :
00962798578964 600 00962785985764
00962798578964 110 00962786897532
00962798578964 61 00962776898523
00962798578964 111 00962795225325
00962798578964 45 00962777965862
00962798578964 55 00962799548155


- $1 : number of mobile doing calls to another numbers
- $2 : time of calls in secondes.
- $3 : number of reciver call.


I need code in awk do this :
Print time of calls in mintues as this :
600/60 = 60
110/60= 2
61/60=2
111/60=2
45/60=1
55/60=1
*hint : if time of call < 60 sec then time= 1 mintue

*hint in this file we have three companys (in $3) numbers:
-0096278*******
-0096277*******
-0096279*******

*I want to print sum of time (in mintue) for each company alone :
Example :
600/60 + 110/60 = 12 min
Example :
61/60 + 45/60 = 3 min
Exactly I want to print :
12 min
3 min
3 min
 
Old 12-22-2012, 09:05 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate. Please, follow discussion here: http://www.linuxquestions.org/questi...6/#post4854956.
 
Old 12-22-2012, 09:39 AM   #3
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
I think you've forgotten to close this thread.
 
Old 12-22-2012, 09:42 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
I can't, since I'm not a moderator of this forum. Waiting for another mod to take care of the closure.
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration