Hello,
I need a perl script that runs under linux that should recursively
search the directory tree and print out all the files that have a uid or
gid that does not resolv to a username or userid.
Can anyone give me a hint ?
Thanks
Andreas
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For a
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I'd use some combination of File::Find with getgrgid and getpwuid
with the wanted callback.
#!/usr/bin/perl -w
use strict;
use File::Find;
my @directories = ('/dir1','/dir2');
find(\&wanted,@directories);
sub wanted {
my ($dev, $ino, $
Andreas Moroder wrote:
> Hello,
Hello,
> I need a perl script that runs under linux that should recursively
> search the directory tree and print out all the files that have a uid or
> gid that does not resolv to a username or userid.
>
> Can anyone give me a hint ?
perl -e'exec qw[ find / -nou
Hi,
I have to combine several Unix password files and remove any duplicate
accounts - putting this into LDAP.
I have the following code that will remove any duplicate whole lines but
I need to remove lines only if the first field of the password file is a
duplicate.
-
use str
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
or perhaps more to the point
my ($uid,$gid) = (lstat($_))[4..5];
On Feb 28, 2007, at 12:30 AM, Neal Clark wrote:
sub wanted {
my ($dev, $ino, $mode, $nlink, $uid, $gid) = lstat($_);
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (Dar
-Original Message-
>From: "Keenan, Greg John (Greg)** CTR **" <[EMAIL PROTECTED]>
>Sent: Feb 28, 2007 12:39 PM
>To: beginners@perl.org
>Subject: remove line if field one is duplicate
>
>Hi,
>
>I have to combine several Unix password files and remove any duplicate
>accounts - putting this
--- Tom Phoenix <[EMAIL PROTECTED]> wrote:
> On 2/27/07, oryann9 <[EMAIL PROTECTED]> wrote:
>
> > Problem: cgi calender daynames are not matching up
> > with dates. For example: Todays date 02/27/2007 is
> > being printed under Thursday instead of Tuesday.
>
> Is the problem that you need to det
Hi all.
I have an issue with some characters passed back or read to a file.
The character is a right arrow? When I read it I only get up to that
character. The remaining characters are dropped.
I have tried printing the string to a file, reading it in an array and
so forth.
When I
On 2/27/07, Keenan, Greg John (Greg)** CTR **
<[EMAIL PROTECTED]> wrote:
Hi,
I have to combine several Unix password files and remove any duplicate
accounts - putting this into LDAP.
I have the following code that will remove any duplicate whole lines but
I need to remove lines only if the firs
On 2/28/07, Ned Cunningham <[EMAIL PROTECTED]> wrote:
I have an issue with some characters passed back or read to a file.
Without knowing what your code looks like, the ord value of the
character, and what system you are running on (is EBCDIC, ascii, or
some other character set?) it is doubtful
Neal Clark schrieb:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I'd use some combination of File::Find with getgrgid and getpwuid with
the wanted callback.
#!/usr/bin/perl -w
use strict;
use File::Find;
my @directories = ('/dir1','/dir2');
find(\&wanted,@directories);
sub wanted {
Hi all,
i have to browse a very long URL from my PERL script and it fails:
http://appft1.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsearch-adv.html&r=0&p=1&f=S&l=50&Query=%28%22NRF3%22+AND+%22Colorectal+Cancer%22%29+OR+%28%22NRF3%22+AND+%22Colorectal+Carcinoma%22%
Hi Tatiana,
On 2007/02/28, at 16:57, Tatiana Lloret Iglesias wrote:
Hi all,
i have to browse a very long URL from my PERL script and it fails:
http://appft1.uspto.gov/netacgi/nph-Parser?
Sect1=PTO2&Sect2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsearch-
adv.html&r=0&p=1&f=S&l=50&Query=%28%22NRF3%22+AND+
I think GET request are restricted to 256 characters, try using POST
instead.
HTH,
Dp.
On 28 Feb 2007 at 18:57, Tatiana Lloret Iglesias wrote:
> Hi all,
>
> i have to browse a very long URL from my PERL script and it fails:
>
> http://appft1.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITO
On 2/28/07, Tatiana Lloret Iglesias <[EMAIL PROTECTED]> wrote:
i have to browse a very long URL from my PERL script and it fails:
Do you know how to make it works??
Do you know that you have the correct URL? If so, you merely need to
fix your code. Since you didn't include any code, I'll su
Yes! that's the problem, GET method doesnt allow very very long url's ...
how can I use POST from Perl code? do you have any example?
Thanks!
T
On 2/28/07, Beginner <[EMAIL PROTECTED]> wrote:
I think GET request are restricted to 256 characters, try using POST
instead.
HTH,
Dp.
On 28 Feb 2
That depends on what your using, CGI or LWP.
A CGI example might be
$q->start_form(-method=>'POST').
Your need to check out the documentation for a full explanation.
HTH,
Dp.
On 28 Feb 2007 at 19:05, Tatiana Lloret Iglesias wrote:
> Yes! that's the problem, GET method doesnt allow very
Tatiana Lloret Iglesias wrote:
Yes! that's the problem, GET method doesnt allow very very long url's ...
how can I use POST from Perl code? do you have any example?
GET and POST are part of XHTML, not Perl.
All you need to do is change your tag to include method="post"
instead of method="get"
but the problem is that i cannot modify form html code because it's a
public external website ...
Thanks!
t
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Tatiana Lloret Iglesias wrote:
but the problem is that i cannot modify form html code because it's a
public external website
If the QUERY_STRING is too long for the URL, your only option is to use
POST.
GET will allow for "canned" queries--that is, you can create a link that
will execut
Hi All,
This is a long shot.
I have a list of files:
hash.buckets
page.index
page.wordlist
word.list
word.index
hash.file
They are part of a SQL/Apache/mod_perl installation and these are
some kind of indices for searches. I want to examine the contents if
possible.
It's quite possible that
On 2/28/07, Beginner <[EMAIL PROTECTED]> wrote:
I have a list of files:
hash.buckets
page.index
page.wordlist
word.list
word.index
hash.file
They are part of a SQL/Apache/mod_perl installation and these are
some kind of indices for searches. I want to examine the contents if
possible.
Have
On 28 Feb 2007 at 9:58, Tom Phoenix wrote:
> On 2/28/07, Beginner <[EMAIL PROTECTED]> wrote:
>
> > I have a list of files:
> >
> > hash.buckets
> > page.index
> > page.wordlist
> > word.list
> > word.index
> > hash.file
> >
> >
> > They are part of a SQL/Apache/mod_perl installation and these are
Hello,
I'm trying to print a tab delimited file based on a colon separated file
matching a key in %hash. I've attempted a few different things w/ the
colon separated file (splitting it into to variables, making it %hash2)
but I'm not having any luck.
I'm trying to match up a text file,
I have been using LWP::Simple successfully to download data files from a
number of sources. I now have to work with a web site that requires a
username and password (which I have) but I have no idea how to get perl
to interface and provide that information.
Thanks,
Jerry
***
On 2/28/07, Wright, Gerald C. <[EMAIL PROTECTED]> wrote:
I have been using LWP::Simple successfully to download data files from a
number of sources. I now have to work with a web site that requires a
username and password (which I have) but I have no idea how to get perl
to interface and provide
--- oryann9 <[EMAIL PROTECTED]> wrote:
> --- Tom Phoenix <[EMAIL PROTECTED]> wrote:
>
> > On 2/27/07, oryann9 <[EMAIL PROTECTED]> wrote:
> >
> > > Problem: cgi calender daynames are not matching
> up
> > > with dates. For example: Todays date 02/27/2007
> is
> > > being printed under Thursday in
> -Original Message-
> From: Brian Volk [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 28, 2007 1:34 PM
> To: beginners@perl.org
> Subject: print if variable matches key
>
> Hello,
>
>
>
> I'm trying to print a tab delimited file based on a colon separated file
> matching a key
> -Original Message-
> From: Brian Volk [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 28, 2007 12:24
> To: Brian Volk; beginners@perl.org
> Subject: RE: print if variable matches key
>
>
>
> > -Original Message-
> > From: Brian Volk [mailto:[EMAIL PROTECTED]
> > Sent: W
> -Original Message-
> From: Wagner, David --- Senior Programmer Analyst --- WGO
> [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 28, 2007 3:31 PM
> To: Brian Volk; Brian Volk; beginners@perl.org
> Subject: RE: print if variable matches key
>
> >
> I am jusmping into the mid
Hello,
I am trying to do the following, do I need to remove the strict option
for this to work or is there a better way ?
--snip--
sub admin {
my $term = shift;
my $host = shift;
my @actions = ( "ssh_login", "su_login", "su_logout", "ssh_logout", "cmds"
);
foreach my
Keenan, Greg John (Greg)** CTR ** wrote:
Hi,
I have to combine several Unix password files and remove any duplicate
accounts - putting this into LDAP.
I have the following code that will remove any duplicate whole lines but
I need to remove lines only if the first field of the password file is
You do have some issues with characters.
they are called newlines.
and carriage returns.
hehe, just kidding. show us some code.
-n
On Feb 28, 2007, at 6:44 AM, Ned Cunningham wrote:
Hi all.
I have an issue with some characters passed back or read to a file.
The character is a right
You could turn of strict refs for just that function if you want.
sub admin {
no strict 'refs';
}
Otherwise you could put valid function names in a hash and call it
based on that. Something like
my @fun = (ssh_login => \&ssh_login, su_login => \&su_login );
...
$fun->{$a}->();
-J
On 2/28/07, Michael Gale <[EMAIL PROTECTED]> wrote:
I am trying to do the following, do I need to remove the strict option
for
this to work or is there a better way ?
There is a better way.
my @actions = ( "ssh_login", "su_login", "su_logout", "ssh_logout", "cmds"
);
for
# Out of curiousity -- why does line 2 get printed first?
#
open(o,"|cat");print o "I think I am 1st? ^L^M";
$_ = "LINE 2: Jvtu bopuifs Pfsm ibdlfs ..."; y/a-z/za-y/; print
__END__
A Note: There is an embedded ^L^M in line 1.
Output:
LINE 2: Just another Perl hacker ...I think I am 1st?
--
WC
On 2/28/07, Bill Jones <[EMAIL PROTECTED]> wrote:
# Out of curiousity -- why does line 2 get printed first?
open(o,"|cat");print o "I think I am 1st? ^L^M";
$_ = "LINE 2: Jvtu bopuifs Pfsm ibdlfs ..."; y/a-z/za-y/; print
Buffering: cat can't give all of its output until you finish writing
t
I have a text file that can be anywhere from 40,000 lines to 120,000
Lines,
I want it to split the file so that no file is larger then 20,000 lines
1) run a line count
2) split the file into pieces
*
The information contai
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have to combine several Unix password files and remove any duplicate
> accounts - putting this into LDAP.
>
> I have the following code that will remove any duplicate whole lines
but
> I need to remove lines only if the first field of the password file is
a
>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Gladstone Daniel - dglads wrote:
> I have a text file that can be anywhere from 40,000 lines to 120,000
> Lines,
>
> I want it to split the file so that no file is larger then 20,000 lines
>
> 1) run a line count
> 2) split the file into pieces
No
At Wednesday, 28 February 2007, "Gladstone Daniel - dglads" wrote:
>I have a text file that can be anywhere from 40,000 lines to 120,000
>Lines,
>
>I want it to split the file so that no file is larger then 20,000 lines
>
>1) run a line count
>2) split the file into pieces
>***
Gladstone Daniel - dglads wrote:
> I have a text file that can be anywhere from 40,000 lines to 120,000
> Lines,
>
> I want it to split the file so that no file is larger then 20,000 lines
>
> 1) run a line count
> 2) split the file into pieces
perl -pe'($.-1)%20_000 or open STDOUT,">",$ARGV
> I am trying to do the following, do I need to remove the strict option
> for this to work or is there a better way ?
>
>--snip--
>sub admin {
>
> my $term = shift;
> my $host = shift;
>
> my @actions = ( "ssh_login", "su_login", "su_logout", "ssh_logout",
> "cmds" );
>
>
>I have a text file that can be anywhere from 40,000 lines to 120,000
>Lines,
>
>I want it to split the file so that no file is larger then 20,000 lines
>
>1) run a line count
>2) split the file into pieces
Hello,
Unix/Linux has a "split" shell command which is very suitable for your purpose.
Tom Phoenix wrote:
> On 2/28/07, Bill Jones <[EMAIL PROTECTED]> wrote:
>
> ># Out of curiousity -- why does line 2 get printed first?
>
> >open(o,"|cat");print o "I think I am 1st? ^L^M";
> >$_ = "LINE 2: Jvtu bopuifs Pfsm ibdlfs ..."; y/a-z/za-y/; print
>
> Buffering: cat can't give all of its
45 matches
Mail list logo