RE: if-statement and grep in one go

2002-06-25 Thread Marco Antonio Valenzuela Escárcega
On Tue, 2002-06-25 at 03:28, David vd Geer Inhuur tbv IPlib wrote: > > Hello, > > Thanks for the solution Bob. > Changed some stuff and have 2 questions open. > > my $line; > my (%u, %g); > open(FILE, "< ${dir}/user.perm") or print "Failed opening file $!"; ## 1 > while ($line =

RE: if-statement and grep in one go

2002-06-25 Thread Bob Showalter
> -Original Message- > From: David vd Geer Inhuur tbv IPlib > [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 25, 2002 6:28 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; > [EMAIL PROTECTED] > Subject: RE: if-statement and grep in one go > > > > Hello,

RE: if-statement and grep in one go

2002-06-25 Thread Felix Geerinckx
on Tue, 25 Jun 2002 10:28:07 GMT, [EMAIL PROTECTED] (David Vd Geer Inhuur Tbv Iplib) wrote: > Changed some stuff and have 2 questions open. > [code snipped] > 1) I don't like to die in my script as there are many files to >read. And if I can't open the current file I just want to >con

RE: if-statement and grep in one go

2002-06-25 Thread David vd Geer Inhuur tbv IPlib
Hello, Thanks for the solution Bob. Changed some stuff and have 2 questions open. my $line; my (%u, %g); open(FILE, "< ${dir}/user.perm") or print "Failed opening file $!"; ## 1 while ($line = ) { ## 2 if ($line =~ /^user:/) {

Re: if-statement and grep in one go

2002-06-24 Thread drieux
On Monday, June 24, 2002, at 06:12 , Bob Showalter wrote: David's original file format info: >> an example of the file user.perm would be : >> >> user: vdgeerd, tester >> group: none, >> descr: all, > I think you need to parse this file into some structures rather > than using the simple regex a

RE: if-statement and grep in one go

2002-06-24 Thread Bob Showalter
> -Original Message- > From: David vd Geer Inhuur tbv IPlib > [mailto:[EMAIL PROTECTED]] > Sent: Monday, June 24, 2002 6:03 AM > To: [EMAIL PROTECTED] > Subject: if-statement and grep in one go > > > > Hi, > > I need some help on the followi

Re: if-statement and grep in one go

2002-06-24 Thread John W. Krahn
David Vd Geer Inhuur Tbv Iplib wrote: > > Hi, Hello, > I need some help on the following. > In my script I show users some infodocs after they are verified to be valid users. > Users can have the permissions following the ruleset: > - user (all perm) > - group (all perm), > - descr (Not allowed

if-statement and grep in one go

2002-06-24 Thread David vd Geer Inhuur tbv IPlib
Hi, I need some help on the following. In my script I show users some infodocs after they are verified to be valid users. Users can have the permissions following the ruleset: - user (all perm) - group (all perm), - descr (Not allowed to actualy open this document). Now I do the following in