Another way is to modify your cntrlfile and put a ^ on the beginning of every entry like
and then replace
with
That would allow you to do more pattern matching inside cntrlfile.
Does any one know how to get a recursive directory listing in long format (showing owner, group, permission etc) without listing the files contained in the directories.
The following command also shows the files but I only want to see the directories.
ls -lrtR * (4 Replies)
Hi All,
I need a solution on my following find command
find ./.. -name '*.file' -print
BTW This gives me the output as belows
./rtlsim/test/ADCONV0/infile/ad0_dagctst.file
./rtlsim/test/ADCONV0/user_command.file
./rtlsim/test/ADCONV0/simv.daidir/scsim.db.dir/scsim.db.file... (2 Replies)
Hi,
I am new to perl:
I need to write perl script to list all the files present in directory and mail should be come to my inbox with all the files present in that directory.
advanced thanks for valuable inputs.
Thanks
Prakash GR (1 Reply)
Hi,
Please let me know how to find out number of files in a directory excluding existing files..The existing file format will be unknown..each time..
Thanks (3 Replies)
HI All,
At present in my server the log folder was filled up and causing memory issue.
So I am planning to write a script in such a way that the files which are older than 30 days will be deleted and also need to find the files which were not compressed and need to compress this file.... (4 Replies)
I am running Ubuntu 11.10
I have the following files.
geo2503r05690585.html
geo2503r06020612.html
geo2503r06250641.html
geo2503r06490658.html
geo2503r06830686.html
geo2503r05860601.html
geo2503r06130624.html
geo2503r06420648.html
geo2503r06590682.html ... (4 Replies)
Hi,
I have a folder which contains files in this format.
abc-bin.000001
abc-bin.000002
abc-bin.000003
abc-bin.000004
abc-bin.000005
abc-bin.000006
abc-bin.000007
abc-bin.000008
abc-bin.000009
abc-bin.000010
abc-bin.index
I want to copy all the files between
abc-bin.000004... (6 Replies)
Find all files in the current directory only excluding hidden directories and files.
For the below command, though it's not deleting hidden files.. it is traversing through the hidden directories and listing normal which should be avoided.
`find . \( ! -name ".*" -prune \) -mtime +${n_days}... (7 Replies)
Hi,
I want to display the file names and the record count for the files in the 2nd column for the files created today.
i have written the below command which is listing the file names. but while piping the above command to the wc -l command
its not working for me.
ls -l... (5 Replies)
Hii,
Could someone help me to append string to the starting of all the filenames inside a directory but it should exclude .zip files and subdirectories.
Eg.
file1: test1.log
file2: test2.log
file3 test.zip
After running the script
file1: string_test1.log
file2: string_test2.log
file3:... (4 Replies)
Discussion started by: Ravi Kishore
4 Replies
LEARN ABOUT MOJAVE
moose::meta::attribute::native::trait::string5.18
Moose::Meta::Attribute::Native::Trait::String(3) User Contributed Perl Documentation Moose::Meta::Attribute::Native::Trait::String(3)NAME
Moose::Meta::Attribute::Native::Trait::String - Helper trait for Str attributes
VERSION
version 2.1202
SYNOPSIS
package MyHomePage;
use Moose;
has 'text' => (
traits => ['String'],
is => 'rw',
isa => 'Str',
default => q{},
handles => {
add_text => 'append',
replace_text => 'replace',
},
);
my $page = MyHomePage->new();
$page->add_text("foo"); # same as $page->text($page->text . "foo");
DESCRIPTION
This trait provides native delegation methods for strings.
DEFAULT TYPE
If you don't provide an "isa" value for your attribute, it will default to "Str".
PROVIDED METHODS
o inc
Increments the value stored in this slot using the magical string autoincrement operator. Note that Perl doesn't provide analogous
behavior in "--", so "dec" is not available. This method returns the new value.
This method does not accept any arguments.
o append($string)
Appends to the string, like ".=", and returns the new value.
This method requires a single argument.
o prepend($string)
Prepends to the string and returns the new value.
This method requires a single argument.
o replace($pattern, $replacement)
Performs a regexp substitution ("s" in perlop). There is no way to provide the "g" flag, but code references will be accepted for the
replacement, causing the regex to be modified with a single "e". "/smxi" can be applied using the "qr" operator. This method returns
the new value.
This method requires two arguments.
o match($pattern)
Runs the regex against the string and returns the matching value(s).
This method requires a single argument.
o chop
Just like "chop" in perlfunc. This method returns the chopped character.
This method does not accept any arguments.
o chomp
Just like "chomp" in perlfunc. This method returns the number of characters removed.
This method does not accept any arguments.
o clear
Sets the string to the empty string (not the value passed to "default").
This method does not have a defined return value.
This method does not accept any arguments.
o length
Just like "length" in perlfunc, returns the length of the string.
o substr
This acts just like "substr" in perlfunc. When called as a writer, it returns the substring that was replaced, just like the Perl
builtin.
This method requires at least one argument, and accepts no more than three.
BUGS
See "BUGS" in Moose for details on reporting bugs.
AUTHORS
o Stevan Little <stevan.little@iinteractive.com>
o Dave Rolsky <autarch@urth.org>
o Jesse Luehrs <doy@tozt.net>
o Shawn M Moore <code@sartak.org>
o XXXX XXX'XX (Yuval Kogman) <nothingmuch@woobling.org>
o Karen Etheridge <ether@cpan.org>
o Florian Ragwitz <rafl@debian.org>
o Hans Dieter Pearcey <hdp@weftsoar.net>
o Chris Prather <chris@prather.org>
o Matt S Trout <mst@shadowcat.co.uk>
COPYRIGHT AND LICENSE
This software is copyright (c) 2006 by Infinity Interactive, Inc..
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.18.2 2014-01-19 Moose::Meta::Attribute::Native::Trait::String(3)