Re: [CentOS-docs] Documentation proposal

2017-10-25 Thread Thibaut Perrin
Hi, No problem, everyone has a life, I understand that ;) I've put the draft of the article in the Scratch section, let me know what you think. Thanks, Thibaut On 25 October 2017 at 22:57, Alan Bartlett wrote: > On 25 October 2017 at 08:08, Thibaut Perrin

Re: [CentOS] [OT] Bash help

2017-10-25 Thread m . roth
Tony Mountifield wrote: > In article > , > wrote: >> Warren Young wrote: >> > On Oct 25, 2017, at 10:02 AM, Mark Haney >> wrote: >> >> >> >> I have a file with two columns 'email' and

Re: [CentOS-docs] Documentation proposal

2017-10-25 Thread Alan Bartlett
On 25 October 2017 at 08:08, Thibaut Perrin wrote: > That would be perfect :) > > On 25 October 2017 at 02:34, Akemi Yagi wrote: >> >> On Tue, Oct 24, 2017 at 2:53 PM, Thibaut Perrin >> wrote: >>> >>> Hi everyone, >>> >>>

Re: [CentOS] [OT] Bash help

2017-10-25 Thread Jon LaBadie
On Wed, Oct 25, 2017 at 10:47:12AM -0600, Warren Young wrote: > On Oct 25, 2017, at 10:02 AM, Mark Haney wrote: > > > > I have a file with two columns 'email' and 'total' like this: > > > > m...@example.com 20 > > m...@example.com 40 > > y...@domain.com 100 > >

Re: [CentOS] [OT] Bash help

2017-10-25 Thread Chris Adams
Once upon a time, Warren Young said: > I was trying to think of which languages I know well which require even more > difficult solutions than the Bash 4 one. It’s a pretty short list: assembly, > C, and MS-DOS batch files. By “C” I’m including anything of its era and >

Re: [CentOS] [OT] Bash help

2017-10-25 Thread Bowie Bailey
On 10/25/2017 3:34 PM, Warren Young wrote: On Oct 25, 2017, at 11:28 AM, Mark Haney wrote: An associative array was the first thing I thought of, then realized BASH doesn't do those. But it does: in Bash 4, only. If you mean you must still use Bash 3 in places, then

Re: [CentOS] [OT] Bash help

2017-10-25 Thread Warren Young
On Oct 25, 2017, at 11:28 AM, Mark Haney wrote: > > An associative array was the first thing I thought of, then realized BASH > doesn't do those. But it does: in Bash 4, only. If you mean you must still use Bash 3 in places, then yeah, you’ve got a problem… one

Re: [CentOS] [OT] Bash help

2017-10-25 Thread Tony Mountifield
In article , wrote: > Warren Young wrote: > > On Oct 25, 2017, at 10:02 AM, Mark Haney wrote: > >> > >> I have a file with two columns 'email' and 'total' like this: > >> > >>

Re: [CentOS] [OT] Bash help

2017-10-25 Thread Robert Arkiletian
On Wed, Oct 25, 2017 at 12:08 PM, Robert Arkiletian wrote: > On Wed, Oct 25, 2017 at 9:59 AM, Robert Arkiletian wrote: >> On Wed, Oct 25, 2017 at 9:41 AM, Mark Haney wrote: >>> On 10/25/2017 12:33 PM, Robert Arkiletian wrote:

Re: [CentOS] [OT] Bash help

2017-10-25 Thread Robert Arkiletian
On Wed, Oct 25, 2017 at 9:59 AM, Robert Arkiletian wrote: > On Wed, Oct 25, 2017 at 9:41 AM, Mark Haney wrote: >> On 10/25/2017 12:33 PM, Robert Arkiletian wrote: >>> >>> here is a python solution >>> #!/usr/bin/python >>> #python 2 (did not check if it

Re: [CentOS] [OT] Bash help

2017-10-25 Thread m . roth
Jason Welsh wrote: > hrm.. seems like you were missing a } > > sort file | awk '{array[$1] += $2;} END { for (i in array) {print i "\t" > array[i];}}' > Oops. Well, it's not vi, it's webmail, so I couldn't check... Thanks. mark > > regards, > > Jason > > > > On 10/25/2017 01:24 PM,

Re: [CentOS] [OT] Bash help

2017-10-25 Thread Jason Welsh
hrm.. seems like you were missing a } sort file | awk '{array[$1] += $2;} END { for (i in array) {print i "\t" array[i];}}' regards, Jason On 10/25/2017 01:24 PM, m.r...@5-cent.us wrote: Warren Young wrote: On Oct 25, 2017, at 10:02 AM, Mark Haney wrote: I

Re: [CentOS] [OT] Bash help

2017-10-25 Thread Leroy Tennison
Not enough experience with the mainframe: I meant WinDoze. - Original Message - From: "m roth" To: "centos" Sent: Wednesday, October 25, 2017 1:02:54 PM Subject: Re: [CentOS] [OT] Bash help Leroy Tennison wrote: > No kidding, but in that "other OS"

Re: [CentOS] [OT] Bash help

2017-10-25 Thread m . roth
Leroy Tennison wrote: > No kidding, but in that "other OS" the answer to the question "how can I > create that report" is usually "You can't unless you spend money for a > third-party application". > "Other", singluar? Did you mean WinDoze, or on an IBM mainframe, or...? mark "been around

Re: [CentOS] [OT] Bash help

2017-10-25 Thread m . roth
Mark Haney wrote: > On 10/25/2017 01:24 PM, m.r...@5-cent.us wrote: >>> >>> This screams out for associative arrays. (Also called hashes, >>> dictionaries, maps, etc.) >>> >>> That does limit you to CentOS 7+, or maybe 6+, as I recall. CentOS 5 >>> is definitely out, as that ships Bash 3, which

Re: [CentOS] [OT] Bash help

2017-10-25 Thread Mark Haney
On 10/25/2017 01:24 PM, m.r...@5-cent.us wrote: This screams out for associative arrays. (Also called hashes, dictionaries, maps, etc.) That does limit you to CentOS 7+, or maybe 6+, as I recall. CentOS 5 is definitely out, as that ships Bash 3, which lacks this feature. Associative

Re: [CentOS] [OT] Bash help

2017-10-25 Thread Leroy Tennison
No kidding, but in that "other OS" the answer to the question "how can I create that report" is usually "You can't unless you spend money for a third-party application". - Original Message - From: "m roth" To: "centos" Sent: Wednesday, October 25,

Re: [CentOS] [OT] Bash help

2017-10-25 Thread m . roth
Warren Young wrote: > On Oct 25, 2017, at 11:00 AM, Leroy Tennison > wrote: >> >> Although "not my question", thanks, I learned a lot about array >> processing from your example. > > Yeah, it’s amazing how many obscure corners of the Bash language must be > tapped to solve

Re: [CentOS] [OT] Bash help

2017-10-25 Thread m . roth
Warren Young wrote: > On Oct 25, 2017, at 10:02 AM, Mark Haney wrote: >> >> I have a file with two columns 'email' and 'total' like this: >> >> m...@example.com 20 >> m...@example.com 40 >> y...@domain.com 100 >> y...@domain.com 30 >> >> I need to get the total number of

Re: [CentOS] [OT] Bash help

2017-10-25 Thread Mark Haney
On 10/25/2017 12:47 PM, Warren Young wrote: You’re making things hard on yourself by insisting on Bash, by the way. This solution is better expressed in Perl, Python, Ruby, Lua, JavaScript…probably dozens of languages. Yeah, you're right, I am. An associative array was the first thing I

Re: [CentOS] [OT] Bash help

2017-10-25 Thread Warren Young
On Oct 25, 2017, at 11:00 AM, Leroy Tennison wrote: > > Although "not my question", thanks, I learned a lot about array processing > from your example. Yeah, it’s amazing how many obscure corners of the Bash language must be tapped to solve such a simple problem. I

Re: [CentOS] [OT] Bash help

2017-10-25 Thread Leroy Tennison
Although "not my question", thanks, I learned a lot about array processing from your example. - Original Message - From: "warren" To: "centos" Sent: Wednesday, October 25, 2017 11:47:12 AM Subject: Re: [CentOS] [OT] Bash help On Oct 25, 2017, at

Re: [CentOS] [OT] Bash help

2017-10-25 Thread Robert Arkiletian
On Wed, Oct 25, 2017 at 9:41 AM, Mark Haney wrote: > On 10/25/2017 12:33 PM, Robert Arkiletian wrote: >> >> here is a python solution >> #!/usr/bin/python >> #python 2 (did not check if it works) >> f=open('yourfilename') >> D={} >> for line in f: >> email,num =

Re: [CentOS] [OT] Bash help

2017-10-25 Thread Warren Young
On Oct 25, 2017, at 10:02 AM, Mark Haney wrote: > > I have a file with two columns 'email' and 'total' like this: > > m...@example.com 20 > m...@example.com 40 > y...@domain.com 100 > y...@domain.com 30 > > I need to get the total number of messages for each email

Re: [CentOS] [OT] Bash help

2017-10-25 Thread Bowie Bailey
On 10/25/2017 12:41 PM, Mark Haney wrote: On 10/25/2017 12:33 PM, Robert Arkiletian wrote: here is a python solution #!/usr/bin/python #python 2 (did not check if it works) f=open('yourfilename') D={} for line in f: email,num = line.split() if email in D: D[email] = D[email]

Re: [CentOS] [OT] Bash help

2017-10-25 Thread Pete Biggs
On Wed, 2017-10-25 at 12:02 -0400, Mark Haney wrote: > I know this is for CentOS stuff, but I'm at a loss on how to build a > script that does what I need it to do. It's probably really logically > simple, I'm just not seeing it. Hopefully someone will take pity on me > and at least give me a

Re: [CentOS] [OT] Bash help

2017-10-25 Thread Mark Haney
On 10/25/2017 12:33 PM, Robert Arkiletian wrote: here is a python solution #!/usr/bin/python #python 2 (did not check if it works) f=open('yourfilename') D={} for line in f: email,num = line.split() if email in D: D[email] = D[email] + num else: D[email] = num

Re: [CentOS] [OT] Bash help

2017-10-25 Thread Robert Arkiletian
On Wed, Oct 25, 2017 at 9:02 AM, Mark Haney wrote: > I know this is for CentOS stuff, but I'm at a loss on how to build a script > that does what I need it to do. It's probably really logically simple, I'm > just not seeing it. Hopefully someone will take pity on me and

[CentOS] [OT] Bash help

2017-10-25 Thread Mark Haney
I know this is for CentOS stuff, but I'm at a loss on how to build a script that does what I need it to do.  It's probably really logically simple, I'm just not seeing it.  Hopefully someone will take pity on me and at least give me a big hint. I have a file with two columns 'email' and

Re: [CentOS] Not Able to Configure Nagios Server 4.3.4 in Centos 7

2017-10-25 Thread Abhinay Khanna
Thanks for your reply Actually the case is that the compiling process and make all, make install processes didn't report any errors but when I trying to access or start the service Nagios it gives me an error stating it's unable to find that service. This happens with me when I try to

[CentOS-announce] CEEA-2017:3052 CentOS 7 tzdata Enhancement Update

2017-10-25 Thread Johnny Hughes
CentOS Errata and Enhancement Advisory 2017:3052 Upstream details at : https://access.redhat.com/errata/RHEA-2017:3052 The following updated files have been uploaded and are currently syncing to the mirrors: ( sha256sum Filename ) x86_64:

[CentOS-announce] CEEA-2017:3052 CentOS 6 tzdata Enhancement Update

2017-10-25 Thread Johnny Hughes
CentOS Errata and Enhancement Advisory 2017:3052 Upstream details at : https://access.redhat.com/errata/RHEA-2017:3052 The following updated files have been uploaded and are currently syncing to the mirrors: ( sha256sum Filename ) i386:

Re: [CentOS-docs] Documentation proposal

2017-10-25 Thread Thibaut Perrin
That would be perfect :) On 25 October 2017 at 02:34, Akemi Yagi wrote: > On Tue, Oct 24, 2017 at 2:53 PM, Thibaut Perrin > wrote: > >> Hi everyone, >> >> ThibautPerrin here, I would like to propose a How-To to use php7.x on >> CentOS 7, using the