Re: sed(1) regular expression gurus

2003-07-14 Thread Thomas McIntyre
Dave wrote:

 This is better than anything I've dreamed up with sed or awk, and
 is really close, but it fails on this:

  by nospam.mc.mpls.visi.com (8.11.6/8.11.6.2) with ESMTP id
3A4E07B03

I know you want to avoid perl, but this kind of problem is it's
sweet spot.  The following might be incrementally better (though the
expression to recognize a dotted quad is technically incorrect):

perl -ne '
next unless /^by/; 
@f=(split)[1..2]; 
$_=pop @f; 
s/^\D*//g; 
s/\D*$//g; 
push(@f,$_) if /^(\d{1,3}\.){3}(\d{1,3})$/; 
print join( , @f).\n;
'

I'm not fluent enough to translate it but I think awk has all the
required features to do so.

Tom McIntyre


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: automatically using nice

2003-07-01 Thread Thomas McIntyre
Simon Barner wrote:
 You could either modify your scripts to use nice, or start a new
 shell with an appropriate nice level. All the processes you launch
 from that shell will inherit the nice level of that shell:

A user can also be niced by login classes:

gccuser:*:1000:0:interactive:::gccuser:/home/gccusr:/bin/csh

with /etc/login.conf (less /etc/login.conf, man login.conf, man 5
passwd, /handbook/users-limiting.html):

interactive:\
:priority=20:\
:tc=default:

To renice interactively, you can su - gccuser, do so manually, or
spawn/exec the current login shell:

exec bash --login

with ~/.bash_login:

renice 20 $$
export PS1=[EMAIL PROTECTED]:\j:\w]\$ 

But be sure not to nice background processes -- it might break the
warrantee

Regards,
Tom McIntyre


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Setup of a software RAID-1 to an existing system?

2003-06-22 Thread Thomas McIntyre
Johan,

The canonical answer is to repost to freebsd-questions, which enjoys
a larger readership.  But I'll try -- your question is interesting
b/c I'm in the same boat, except w/ CURRENT.  As you said, breezing
through the handbook will show a lot of detail, but perhaps it does
not directly address mirroring a live fs.

Aside from the handwaving, you might check http://www.vinumvm.org/. 
There seems to be a relevant (if a little dated) article:

   
http://www.freebsd.org/doc/en_US.ISO8859-1/articles/vinum/index.html

It may be possible to mirror partitions, even if half of it is live. 
Were this not the case, it's prob possible to boot the install cdrom
and play some tricks with dd or dump to sync the disks.  Perhaps they
could then be mounted, vinum set up, and then booted into.  

It would be fantastic if the freebsd installer had the ability to run
raid 1 right out the chute.  Doubtless, there's a number of us w/
legacy servers having two disks but no hardware raid.

Good luck.  Share your notes (at least to newbies) once you get it
working!

Regards,
Tom McIntyre

-Original Message-
From: Johan Paul [mailto:[EMAIL PROTECTED]
Sent: Sunday, June 22, 2003 12:19 PM
To: [EMAIL PROTECTED]
Subject: Setup of a software RAID-1 to an existing system?


Hi all!

I am pretty new to FreeBSD but thought it might be a nice idea to 
migrate from a Linux server to a FreeBSD one.

My question is regarding software RAID-1 for this FreeBSD box. I have

two IDE equally sized hard drives and I installed FreeBSD 4.8 on the 
other one. Now the question is: can I make a RAID-1 array of these
two 
disks while FreeBSD is installed on the other one (using vinum or 
other...)? Or how do I get RAID-1 to work on these two disks?

I've read some of the vinum documentation but it is unclear to me if
it 
is possible to set up a RAID-1 on a running disk system - and if my 
assumptions are correct, that it is impossible, it is unclear to me
how 
to set up this RAID-1?


Regards,

Johan Paul


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Granting access on MySQL

2003-06-22 Thread Thomas McIntyre
Konrad Scorciapino wrote:

 I need to grant a user access to a database. How can I do it?

One thing to check is if you need to reload privileges.  The mysql
doc has lots of info on this.  Another short term way to move fwd
might be to install webmin or phpMyAdmin, both of which are available
in freebsd ports.

Tom McIntyre


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]