I want to check the second argument for a specific string .
The code below is what I am trying, but I get:
UX:test (./test): ERROR: { if ($0 ~ /StringImLooking4/) {print $1} }: Unknown operator
I want to test if the second argument contains the string StringImLooking4
Unixware 7
... (1 Reply)
Hi,
I have 5 files in a directory.
emp1_usage.txt
emp2_usage.txt
emp3_usage.txt
emp4_usage.txt
emp5_usage.txt
I am using sqlldr to get the contents of the above 5 files and store it in a temp table and update my original table using temp table.
for f in *emp*.txt
do
sqlldr... (3 Replies)
I am trying to grep for filenames containing a specific value within a particular segment. The lines containing the segment I'm looking through reads like "HL^1^^1^1", "10^9^9^0", and "HL^11^4^8^1". I would like to find the data that contains only the number nine after the third caret where the... (4 Replies)
Suppose there are multiple files containing certain text "abc". How to print the name of all such files with a single command from unix prompt?
Thanks in advance (6 Replies)
Hi All,
I have a file (Names.txt) and the contents of the file is give below.
$ cat Names.txt
FF313207008.txt
FF223207007.txt
FF143207006.txt
FF372150600.txt
FF063407005.txt
FF063307005.txt
$
From these given file names I want to find the files which has the 6th index value as 2. So... (5 Replies)
Hello all,
i have tons of files in folder named like this (yyyymmdd):
bookcollection20100729
bookcollection20100730
bookcollection20100731
bookcollection20100801
bookcollection20100802
etc.
I need to find files with date range in there names lets say from 2010.07.30 - 2010.08.02
... (10 Replies)
Hi,
Could someone give me a hand with a search for files with two possible extensions, please. The requirement is simple - I need to issue a single ls command searching for files with the suffix of, say, *.txt and *.log.
I've tried to use ls *.txt *.log which works if there are both... (4 Replies)
Hi,
I have got some 10 filenames stored in a file or displayed in the console as a result of some query i made.. Now I need to open each of these files and search for a pattern in these 10 files.. Can someone help me with this?
Thanks,
Jean (9 Replies)
Hi,
We are doing some migration work. The same files may exist in different partition/mountpoints. We may place it in a single place, hence we don't want any duplicates...we will rename the file names if we know the files which has duplicates(by file name)).
It would be nice if a script... (3 Replies)
So I'm grepping for the following right now:
ls -la /somedirectory/*.log* | awk '{print $9}'
The problem with this is that I get the following output:
/somedirectory/errors_1_foo.log
/somedirectory/errors_1_foo.log.1
/somedirectory/errors_1_foo.log.2... (4 Replies)
Discussion started by: LinuxRacr
4 Replies
LEARN ABOUT DEBIAN
text::micromason::templatepath
MicroMason::TemplatePath(3pm) User Contributed Perl Documentation MicroMason::TemplatePath(3pm)NAME
Text::MicroMason::TemplatePath - Template Path Searching
SYNOPSIS
Instead of using this class directly, pass its name to be mixed in:
use Text::MicroMason;
my $mason = Text::MicroMason->new( -TemplatePath, template_path => [ '/foo', '/bar' ] );
Use the standard compile and execute methods to parse and evalute templates:
print $mason->compile( file=>$filepath )->( 'name'=>'Dave' );
print $mason->execute( file=>$filepath, 'name'=>'Dave' );
Templates stored in files are searched for in the specified template_path:
print $mason->execute( file=>"includes/greeting.msn", 'name'=>'Charles');
When including other files into a template you can use relative paths:
<& ../includes/greeting.msn, name => 'Alice' &>
When a file is included in the template, the including template's current directory is added to the beginning of the template search path.
DESCRIPTION
This module works similarly to the related TemplateDir mix-in. However, instead of specifying a single root which must contain all
templates, TemplatePath allows you to specify an arrayref of directories which will be searched in order whenever a template filename must
be resolved.
Using a TemplatePath object, absolute filenames are used as-is. If a relative template filenames or file paths is used, every directory in
the specified template_path is checked for the existence of the template, and the first existing template file is used.
If a template includes another template using <& ... &>, then the including template's location is added to the beginning of the template
search path list, for the resolution of the included template's filename. This allows the included template to be specified relative to the
including template, but also lets the template search fall back to the configured template search path if necessary.
Supported Attributes
template_path
An array ref containing a list of directories in which to search for relative template filenames.
strict_root
Optional directory beyond which not to read files. Unlike TemplateDir, this must be a specific file path. Causes read_file to croak if
any filename outside of the root is provided. You should make sure that all paths specified in template_path are inside the specified
strict_root. (Note that this is not a chroot jail and only affects attempts to load a file as a template; for greater security see the
chroot() builtin and Text::MicroMason::Safe.)
Private Methods
read_file
Intercepts file access to check for strict_root.
EXCEPTIONS
The following additional exceptions are generated by Text::MicroMason::TemplatePath when appropriate:
o Text::MicroMason::TemplatePath: template '%s' not found in path.
This indicates that the specified template name does not exist in any of the directories in the configured path.
o Text::MicroMason::TemplatePath: Template not in required base path '%s'
The template found in the configured template path was not within the configured strict_root directory. This may be caused by
requesting an absolute template filename not within strict_root, or by specifying a strict_root which does not match the configured
template path.
SEE ALSO
For an overview of this templating framework, see Text::MicroMason.
This is a mixin class intended for use with Text::MicroMason::Base.
For distribution, installation, support, copyright and license information, see Text::MicroMason::Docs::ReadMe.
perl v5.10.1 2009-10-27 MicroMason::TemplatePath(3pm)