Dear friends,
please tell me how to find the files which are existing in the current directory, but it sholud not search in the sub directories..
it is like this,
current directory contains
file1, file2, file3, dir1, dir2
and dir1 conatins
file4, file5
and dir2 contains
file6,... (9 Replies)
Hi,
I have defined an array which holds a couple of elements which are nothing but files names. I want to find the files in a directory for the matching file name(array elements) with less than 1 day old.
When I am trying to execute the code (as below), it gives an error.
Your help in this... (1 Reply)
How do I find all "regular" files on solaris(8) that are open for write ( +read as well).
I tried using pfiles, and lsof commands, but not sure how to get exactly what I wanted.
ps -e | awk '{ print $1 }' | xargs -i pfiles {} 2>/dev/null (10 Replies)
why is this giving me errors?
i type this in: find / -name "something.txt" 2>/dev/null
i get the following error messages:
find: bad option 2
find: path-list predicate-list
:confused: (5 Replies)
If I enter (simplified):
find . -printf "%p\n"
then all files in the output are prepended by a "." like
./local/share/test23.log
How can achieve that
a.) the leading "./" is omitted
and/or
b.) the full path to the current directory is inserted (enclosed by brackets and a blank)... (1 Reply)
Hello everyone
Sorry I have to add another sed question. I am searching a log file and need only the first 2 occurances of text which comes after (note the space) "string " and before a ",". I have tried
sed -n 's/.*string \(*\),.*/\1/p' filewith some, but limited success. This gives out all... (10 Replies)
How can I recursively find all files in a directory and print out the file and first line number of any text blocks that match the below cases?
This would seem to involve find, xargs, *grep, regex, etc.
In summary, I want to find so-called empty "try-catch blocks" that do not contain code... (0 Replies)
I have a bunch of random character lines like ABCEDFG. I want to find all lines with "A" and then change any "E" to "X" in the same line. ALL lines with "A" will have an "X" somewhere in it. I have tried sed awk and vi editor. I get close, not quite there. I know someone has already solved this... (10 Replies)
These three finds worked as expected:
$ find . -iname "*.PDF"
$ find . -iname "*.PDF" \( ! -name "*_nobackup.*" \)
$ find . -path "*_nobackup*" -prune -iname "*.PDF"
They all returned the match:
./folder/file.pdf
:b:
This find returned no matches:
$ find . -path "*_nobackup*" -prune... (3 Replies)
Discussion started by: wolfv
3 Replies
LEARN ABOUT DEBIAN
pod::elemental::transformer::nester
Pod::Elemental::Transformer::Nester(3pm) User Contributed Perl Documentation Pod::Elemental::Transformer::Nester(3pm)NAME
Pod::Elemental::Transformer::Nester - group the document into sections
VERSION
version 0.102362
OVERVIEW
The Nester transformer is meant to find potential container elements and make them into actual containers. It works by being told what
elements may be made into containers and what subsequent elements they should allow to be stuffed into them.
For example, given the following nester:
use Pod::Elemental::Selectors qw(s_command s_flat);
my $nester = Pod::Elemental::Transformer::Nester->new({
top_selector => s_command('head1'),
content_selectors => [
s_command([ qw(head2 head3 head4) ]),
s_flat,
],
});
..then when we apply the transformation:
$nester->transform_node($document);
...the nester will find all "=head1" elements in the top-level of the document. It will ensure that they are represented by objects that
perform the Pod::Elemental::Node role, and then it will move all subsequent elements matching the "content_selectors" into the container.
So, if we start with this input:
=head1 Header
=head2 Subheader
Pod5::Ordinary <some content>
=head1 New Header
The nester will convert its structure to look like this:
=head1 Header
=head2 Subheader
Pod5::Ordinary <some content>
=head1 New Header
Once an element is reached that does not pass the content selectors, the nesting ceases until the next potential container.
ATTRIBUTES
top_selector
This attribute must be a coderef (presumably made from Pod::Elemental::Selectors) that will test elements in the transformed node and
return true if the element is a potential new container.
content_selectors
This attribute must be an arrayref of coderefs (again presumably made from Pod::Elemental::Selectors) that will test whether paragraphs
subsequent to the top-level container may be moved under the container.
AUTHOR
Ricardo SIGNES <rjbs@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-05-05 Pod::Elemental::Transformer::Nester(3pm)