similar to: [OT] Bash help

Displaying 20 results from an estimated 7000 matches similar to: "[OT] Bash help"

2017 Oct 25
6
[OT] Bash help
Warren Young wrote: > On Oct 25, 2017, at 10:02 AM, Mark Haney <mark.haney at neonova.net> wrote: >> >> I have a file with two columns 'email' and 'total' like this: >> >> me at example.com 20 >> me at example.com 40 >> you at domain.com 100 >> you at domain.com 30 >> >> I need to get the total number of messages for
2017 Oct 25
1
[OT] Bash help
Tony Mountifield wrote: > In article > <b5215baacd93a6e85efc59947f9b8ed9.squirrel at host290.hostmonster.com>, > <m.roth at 5-cent.us> wrote: >> Warren Young wrote: >> > On Oct 25, 2017, at 10:02 AM, Mark Haney <mark.haney at neonova.net> >> wrote: >> >> >> >> I have a file with two columns 'email' and 'total'
2017 Oct 25
3
[OT] Bash help
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 thought of, then realized BASH doesn't do those.? I honestly expected there to be a fairly
2017 Oct 25
2
[OT] Bash help
Although "not my question", thanks, I learned a lot about array processing from your example. ----- Original Message ----- From: "warren" <warren at etr-usa.com> To: "centos" <centos at centos.org> Sent: Wednesday, October 25, 2017 11:47:12 AM Subject: Re: [CentOS] [OT] Bash help On Oct 25, 2017, at 10:02 AM, Mark Haney <mark.haney at neonova.net>
2017 Oct 25
0
[OT] Bash help
On Oct 25, 2017, at 10:02 AM, Mark Haney <mark.haney at neonova.net> wrote: > > I have a file with two columns 'email' and 'total' like this: > > me at example.com 20 > me at example.com 40 > you at domain.com 100 > you at domain.com 30 > > I need to get the total number of messages for each email address. This screams out for associative
2017 Oct 25
3
[OT] Bash help
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 > f.close() > for key in D: >
2017 Nov 15
6
run bash <filename> from cron
This might be a bit OT, but I've never had to do this before and what I've googled doesn't seem to be working. I have an ansible playbook that I'm working on that I want to run as a cronjob.? One task I'm having trouble with is where I have a text file with lines like: rd.pl "blah blah" rd.pl "blah blah blah" This text file has to be 'executed'
2017 Oct 25
1
[OT] Bash help
On Wed, Oct 25, 2017 at 9:59 AM, Robert Arkiletian <robark at gmail.com> wrote: > On Wed, Oct 25, 2017 at 9:41 AM, Mark Haney <mark.haney at neonova.net> 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) >>>
2017 Oct 25
0
[OT] Bash help
On 10/25/2017 01:24 PM, m.roth at 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. > <snip> > Associative arrays? > > Awk! Awk! (No, I
2017 May 26
1
CentOS 6 dhcpd custom log issues
Hi all, I've got an issue with C6's dhcpd custom logging that I cannot figure out. Hopefully someone has an idea, or has seen a similar issue. We have dhcpd logging to /var/log/messages a custom header (DHCPUSER:) with MAC, IP and Circuit-ID. I'll not bore you with the guts, so here's the beginning of that line in dhcpd.conf: if exists agent.circuit-id { log (info,
2017 Aug 10
3
BIND 9.9 RRL
I can't seem to find anything clear on this, but is the C7 version of BIND 9.9 built with Request Rate Limiting? -- Mark Haney Network Engineer at NeoNova 919-460-3330 option 1 mark.haney at neonova.net www.neonova.net
2017 Nov 01
2
Kickstart ksdevice question
On 11/01/2017 01:57 PM, Tristan Hoar wrote: > > Strictly speaking it is depricated > https://anaconda-installer.readthedocs.io/en/latest/boot-options.html#d > eprecated-options > > Regards, > > Tris > Okay, so it looks like I can simply change ksdevice=eth0? to bootdev=eth0, correct? -- Mark Haney Network Engineer at NeoNova 919-460-3330 option 1 mark.haney at
2017 Nov 01
6
Kickstart ksdevice question
This should be easy to answer (I hope).? We routinely kickstart boxes to use for managing our customers RADIUS/DHCP configurations (along with other things).? We've had a C7 kickstart in place since I built one in May and are finally starting to roll it out for new installations.? But, I'm curious as to what ksdevice= actually does. With the C6 we routinely used ksdevice=eth0 since we
2017 Nov 01
2
Kickstart ksdevice question
On 11/01/2017 03:25 PM, Chris Adams wrote: > Once upon a time, Mark Haney <mark.haney at neonova.net> said: >> Okay, so it looks like I can simply change ksdevice=eth0? to >> bootdev=eth0, correct? > I believe you can just leave both off (IIRC for CentOS 6 as well) if you > add "ipappend 2" to the pxelinux stanza. > I probably should have clarified that
2017 Jul 10
2
chkconfig madness CentOS 7
I have a couple of in use C7 boxes that were built with ntsysv and chkconfig for some old packages that needed to start using init.d. (The person setting these up didn't know about systemd creating service files for older packages, so we're stuck with these as-is. Here's my problem: Error unpacking rpm package chkconfig-1.7.2-1.el7.x86_64 error: unpacking of archive failed on
2017 Nov 15
1
run bash <filename> from cron
> On Nov 15, 2017, at 11:48 AM, m.roth at 5-cent.us wrote: > > Mark Haney wrote: >> This might be a bit OT, but I've never had to do this before and what >> I've googled doesn't seem to be working. >> >> I have an ansible playbook that I'm working on that I want to run as a >> cronjob. One task I'm having trouble with is where I have a
2017 Oct 25
0
[OT] Bash help
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.roth at 5-cent.us wrote: > Warren Young wrote: >> On Oct 25, 2017, at 10:02 AM, Mark Haney <mark.haney at neonova.net> wrote: >>> I have a file with two columns 'email' and
2017 Aug 09
3
Errors on an SSD drive
To be honest, I'd not try a btrfs volume on a notebook SSD. I did that on a couple of systems and it corrupted pretty quickly. I'd stick with xfs/ext4 if you manage to get the drive working again. <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon> Virus-free. www.avast.com
2017 Nov 08
3
Possibly [OT] ansible vmware inventory plugin
This might be OT, but it is CentOS related.? I've been running Ansible on C7 for a handful of months now, and updated to 2.4 as soon as it was available. I've been building inventories by hand in that time (mostly due to the fact we had no actual documentation on the managed external customer servers). However, as we have a multiple VMware clusters, thought it might be time to tinker
2017 Oct 25
0
[OT] Bash help
In article <b5215baacd93a6e85efc59947f9b8ed9.squirrel at host290.hostmonster.com>, <m.roth at 5-cent.us> wrote: > Warren Young wrote: > > On Oct 25, 2017, at 10:02 AM, Mark Haney <mark.haney at neonova.net> wrote: > >> > >> I have a file with two columns 'email' and 'total' like this: > >> > >> me at example.com 20