Sponsored Content
Top Forums Shell Programming and Scripting Passing "|" in split function Post 302485343 by jisha on Wednesday 5th of January 2011 01:28:17 AM
Old 01-05-2011
Perfect Smilie

Thank you so much ... quotemeta is new to me.
 

9 More Discussions You Might Find Interesting

1. Programming

How to convert the "select" function into a "poll" function

i have a program using the select function but i want to convert it to poll... how can i do this? thanks in advance... :) (1 Reply)
Discussion started by: rbolante
1 Replies

2. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

3. HP-UX

ERROR: more than one instance of overloaded function "vprintf" has "C" linkage

Hi people! I've got this own library: -------------------------------------------- Personal.h -------------------------------------------- #ifdef __cplusplus extern "C" { #endif #include <stdio.h> #include <stdarg.h> #include <string.h> ... (0 Replies)
Discussion started by: donatoll
0 Replies

4. Shell Programming and Scripting

cat $como_file | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'

hi All, cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g' Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Solaris

The slices "usr", "opt", "tmp" disappeared!!! Help please.

The system don't boot. on the screen appears following: press enter to maintenance (or type CTRL-D to continue)...I checked with format command. ... the slices "0-root","1-swap","2-backup" exist. ...the slises "3-var","6-usr" -unassigned. :( (16 Replies)
Discussion started by: wolfgang
16 Replies

7. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

8. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

9. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies
Template::Parser(3)					User Contributed Perl Documentation				       Template::Parser(3)

NAME
Template::Parser - LALR(1) parser for compiling template documents SYNOPSIS
use Template::Parser; $parser = Template::Parser->new(\%config); $template = $parser->parse($text) || die $parser->error(), " "; DESCRIPTION
The "Template::Parser" module implements a LALR(1) parser and associated methods for parsing template documents into Perl code. PUBLIC METHODS
new(\%params) The "new()" constructor creates and returns a reference to a new "Template::Parser" object. A reference to a hash may be supplied as a parameter to provide configuration values. See "CONFIGURATION OPTIONS" below for a summary of these options and Template::Manual::Config for full details. my $parser = Template::Parser->new({ START_TAG => quotemeta('<+'), END_TAG => quotemeta('+>'), }); parse($text) The "parse()" method parses the text passed in the first parameter and returns a reference to a hash array of data defining the compiled representation of the template text, suitable for passing to the Template::Document new() constructor method. On error, undef is returned. $data = $parser->parse($text) || die $parser->error(); The $data hash reference returned contains a "BLOCK" item containing the compiled Perl code for the template, a "DEFBLOCKS" item containing a reference to a hash array of sub-template "BLOCK"s defined within in the template, and a "METADATA" item containing a reference to a hash array of metadata values defined in "META" tags. CONFIGURATION OPTIONS
The "Template::Parser" module accepts the following configuration options. Please see Template::Manual::Config for futher details on each option. START_TAG, END_TAG The START_TAG and END_TAG options are used to specify character sequences or regular expressions that mark the start and end of a template directive. my $parser = Template::Parser->new({ START_TAG => quotemeta('<+'), END_TAG => quotemeta('+>'), }); TAG_STYLE The TAG_STYLE option can be used to set both START_TAG and END_TAG according to pre-defined tag styles. my $parser = Template::Parser->new({ TAG_STYLE => 'star', # [* ... *] }); PRE_CHOMP, POST_CHOMP The PRE_CHOMP and POST_CHOMP can be set to remove any whitespace before or after a directive tag, respectively. my $parser = Template::Parser-E<gt>new({ PRE_CHOMP => 1, POST_CHOMP => 1, }); INTERPOLATE The INTERPOLATE flag can be set to allow variables to be embedded in plain text blocks. my $parser = Template::Parser->new({ INTERPOLATE => 1, }); Variables should be prefixed by a "$" to identify them, using curly braces to explicitly scope the variable name where necessary. Hello ${name}, The day today is ${day.today}. ANYCASE The ANYCASE option can be set to allow directive keywords to be specified in any case. # with ANYCASE set to 1 [% INCLUDE foobar %] # OK [% include foobar %] # OK [% include = 10 %] # ERROR, 'include' is a reserved word GRAMMAR The GRAMMAR configuration item can be used to specify an alternate grammar for the parser. This allows a modified or entirely new template language to be constructed and used by the Template Toolkit. use MyOrg::Template::Grammar; my $parser = Template::Parser->new({ GRAMMAR = MyOrg::Template::Grammar->new(); }); By default, an instance of the default Template::Grammar will be created and used automatically if a "GRAMMAR" item isn't specified. DEBUG The DEBUG option can be used to enable various debugging features of the "Template::Parser" module. use Template::Constants qw( :debug ); my $template = Template->new({ DEBUG => DEBUG_PARSER | DEBUG_DIRS, }); AUTHOR
Andy Wardley <abw@wardley.org> <http://wardley.org/> COPYRIGHT
Copyright (C) 1996-2007 Andy Wardley. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The main parsing loop of the "Template::Parser" module was derived from a standalone parser generated by version 0.16 of the "Parse::Yapp" module. The following copyright notice appears in the "Parse::Yapp" documentation. The Parse::Yapp module and its related modules and shell scripts are copyright (c) 1998 Francois Desarmenien, France. All rights reserved. You may use and distribute them under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. SEE ALSO
Template, Template::Grammar, Template::Directive perl v5.16.3 2012-01-13 Template::Parser(3)
All times are GMT -4. The time now is 02:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy