Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
CrazyLittle
Sep 11, 2001





Clapping Larry
Can anyone cook up the following regular expression for me: (or help me find a good way to learn how)

I need to find a line in a text file that's over 150chars long, without a line break. Pretty much every other line in the text breaks at ~70-90 chars.

Adbot
ADBOT LOVES YOU

CrazyLittle
Sep 11, 2001





Clapping Larry

dfn_doe posted:

something like
code:
cat [i]filename[/i] |grep '^(.){150}$'
Should match all lines which contain at least 150 characters.

Thanks. I never would have thought to use dot :(

Hrm - that regex isn't working in VIM.

Here's the final regex I used in VIM to find long lines:

code:
/.\{150,}

CrazyLittle fucked around with this message at 19:27 on May 1, 2007

CrazyLittle
Sep 11, 2001





Clapping Larry

Scaevolus posted:

That's the problem, Gentoo stable = Debian unstable.

Hahahah yes. I really really loved it when Gentoo's maintainers decided that it would be a good idea to REVERT PHP5 to PHP4, thus breaking a lot of code I was working on at the time.

CrazyLittle
Sep 11, 2001





Clapping Larry

RoundsToZero posted:

When was this? I used to use PHP on Gentoo around the time PHP5 came out and don't remember this. All I remember is that they switched which category the php package was in, but both versions were available. Possibly PHP5 was in one but not the other. Also, no one was forcing you to downgrade, so I don't see why any of your code would have to be broken. If you already had PHP5 installed, what was keeping you from ignoring the "update"?

It was some time around Nov/Dec 2004 I think. It's been years, and that's one headache I'm happy to forget. Having three bosses breathing down my neck because the everything broke after the CTO did "emerge update world"... well, yeah. As I remember it, we had PHP5 installed by doing "emerge php5", and then a few months later they put PHP5 on the blocked list in portage claiming it was unstable. The next update after that linked in PHP4 instead of PHP5

CrazyLittle
Sep 11, 2001





Clapping Larry

RoundsToZero posted:

Ah that's right. They moved it so both versions were in the same package, but the version 5 didn't go stable right away because it was a new ebuild. I remember this change was announced way in advance, so it's pretty bad that you had a CTO that blindly updated machines and didn't read errata.

Well the real salt in the wounds was that we couldn't fix it -quickly- because of course, to fix it we had to recompile php5 from source. I use Debian now. I'm in a happier place.

CrazyLittle
Sep 11, 2001





Clapping Larry

deong posted:

I'd like to be able to set up a web proxy for a 12yro and then have a non filtered profile also. So if I am understanding DG correctly, I'd just set one profile to use a proxy, and the other will not.

By the time the 12yr old is 12.5yr old, both profiles won't be using the proxy :eng101:

Anything that's within reach of the person using the computer can be turned off. Dansguardian does a decent job of filtering on a preset whitelist, but the wordfiltering functions often get a lot of false positives (like "breast cancer"). I'd say it's the best -free- solution out there, but you should still set DG to be a NAT'd proxied filter on your firewall instead of on the computer itself.

Adbot
ADBOT LOVES YOU

CrazyLittle
Sep 11, 2001





Clapping Larry
I've got a Nagios server and a cacti server, and I would like to use them to monitor the status of a Centos machine that I have running. Do any of you guys have a link or two handy for some Nagios/Cacti templates and net-snmp config examples?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply