Combine passwd files

2001-10-22 Thread John_Kennedy
Hello all, I am trying to write a script that will combine 2 /etc/passwd files. The tricky part is that most of the entries from passwd1 are already in passwd 2 but some have errors. (some of the password fields are locked, some of the group ids are wrong) Does anyone have a script (or know of one

Re: Perl by Example

2001-09-24 Thread John_Kennedy
While I really like using UNIX Shells by Example, PERL by Example has been a bit of a disappointment. The organization could be a bit better and some of the examples haven't worked well for me. I use Programming PERL by O'Reilly almost exclusively. John Teresa Raymond wrote: > > Has anyone us

grep utility

2001-09-14 Thread John_Kennedy
Is this line correct: @UNLOCKED = grep(!/LOCKED/g, @SAME); I want it to check each line of the array @SAME and print lines that DO NOT contain the string "LOCKED" to the array @UNLOCKED. I later output both arrays to different files: print BOTH @SAME; print oBOTH @UNLOCKED; but when I list the

removing spaces from a file

2001-09-14 Thread John_Kennedy
I have a script that creates a file using the grep utility against a "master" file. The new file looks like the master file was copied over and where the grep "failed" there is a blank line. The grep line looks like this: @UNLOCKED = grep(!/LOCKED/g, "@SAME\n"); print oBOTH "@UNLOCKED\n"; with

format + sendmail

2001-09-06 Thread John_Kennedy
I have the following script (simplified) #!/path/to/perl -w open LIST,"/path/to/data" or die "/path/to/data: $!"; open(SENDMAIL, "|/usr/lib/sendmail -oi -t") or die "Unable to fork: $!"; format SENDMAIL= From: Me <[EMAIL PROTECTED]> To: You <[EMAIL PROTECTED]> Subj: Stuff blah blah blah Thank you