Sponsored Content
Special Forums Windows & DOS: Issues & Discussions Configure automatic script in windows server Post 302617783 by itkamaraj on Tuesday 3rd of April 2012 06:05:26 AM
Old 04-03-2012
use the below line in your blat, so that you can check why it is failed.
Code:
-log blat.log

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Automatic FTP Script from windows to unix machine

Hi i need to FTP files from windows to unix(sun) machine using script. what are the scripts commands i need to use to transfer files Thanks (2 Replies)
Discussion started by: bmkreddy
2 Replies

2. Solaris

Script for automatic deletion of trash file of mail server

Hi, I have a mail server with limited space and operating system is sun solaris 8 (sparc). I do not have provisions to increase the space for home directory. So i have to delete files from /home/username/mail/trash which are more than 10 days old automatically. So my script should be like... (1 Reply)
Discussion started by: crown2100bd
1 Replies

3. UNIX for Dummies Questions & Answers

Script runs fine on UNIX Server...Not through MSK Tool kit on Windows Server

I have a .sh script which was running fine on all the UNIX Servers (AIX, SunSolaris). The script requires two mandatory parameters and many optional parameters. Now at a different client place who are on a Windows Server, when I try to execute the script through MKS Toolkit, there are couple of... (5 Replies)
Discussion started by: madhunk
5 Replies

4. Linux

How to configure linux to receive snmp traps from a windows server?

Can anybody please tell me how to configure linux to receive snmp traps from a windows server? I am not able to receieve snmp traps on unix machines specifically linux and solaris. I have tried starting snmptrapd service on linux but it didn't work. Is there anything special that I have to do on... (2 Replies)
Discussion started by: iamtulipin
2 Replies

5. AIX

Do I need to configure my local windows to FTP files from local windows to a UNIX AIX server?

Hi Friends, I have this script for ftping files from AIX server to local windows xp. #!/bin/sh HOST='localsystem.net' USER='myid_onlocal' PASSWD='mypwd_onlocal' FILE='file.txt' ##This is a file on server(AIX) ftp -n $HOST <<END_SCRIPT quote USER $USER quote PASS $PASSWD put $FILE... (1 Reply)
Discussion started by: rajsharma
1 Replies

6. Shell Programming and Scripting

Unix shell script to Copy files from one Windows server to another Windows server.

Can anybody please help me on how to code for the below requirement: I need to write a shell script (on different unix server) to copy files from multiple folders (ex. BRN-000001) from one windows server (\\boldls-mwe-dev4)to a different windows server(\\rrwin-ewhd04.ecomad.int). This shell... (4 Replies)
Discussion started by: SravsJaya
4 Replies

7. Programming

Problem with Perl script after moving from a Windows/Apache Server to a UNIX server.

I have a Perl script that worked fine before moving it to justhost.com. It was on a Windows/Apache server. Just host is using UNIX. Other Perl scripts on other sites that were also moved work fine so I know Perl is functioning. The script is called cwrmail.pl and is located in my cgi-bin. When I... (9 Replies)
Discussion started by: BigBobbyB
9 Replies

8. Ubuntu

Automatic update script issue (Ubuntu server)

Hi, I've created a very basic script to run apt-get update and apt-get dist-upgrade unattended (run with cron) and save the logs. Though, it's not really a script, just a file containing the commands to run in order: pasteit .com/18601 I'm currently testing this and ran into some unexpected... (4 Replies)
Discussion started by: Raxje
4 Replies

9. Shell Programming and Scripting

Connect (SSH) to Windows server via Linux server through a script and passing command.. but failing

I am trying to connect to Windows server via Linux server through a script and run two commands " cd and ls " But its giving me error saying " could not start the program" followed by the command name i specify e g : "cd" i am trying in this manner " ssh username@servername "cd... (5 Replies)
Discussion started by: sunil seelam
5 Replies

10. Linux

How to connect Linux server (configure two way authentication) with Windows server?

Hi my name is Manju. ->I have configure the two way authentication on my linux server. ->Now I am able to apply two way authenticator on particuler user. ->Now I want to map this linux server to my AD server. ->Kindly tell me how to map AD(Active Directory) with this linux server. ... (0 Replies)
Discussion started by: manjusharma128
0 Replies
Template::Plugin::Filter(3)				User Contributed Perl Documentation			       Template::Plugin::Filter(3)

NAME
Template::Plugin::Filter - Base class for plugin filters SYNOPSIS
package MyOrg::Template::Plugin::MyFilter; use Template::Plugin::Filter; use base qw( Template::Plugin::Filter ); sub filter { my ($self, $text) = @_; # ...mungify $text... return $text; } # now load it... [% USE MyFilter %] # ...and use the returned object as a filter [% FILTER $MyFilter %] ... [% END %] DESCRIPTION
This module implements a base class for plugin filters. It hides the underlying complexity involved in creating and using filters that get defined and made available by loading a plugin. To use the module, simply create your own plugin module that is inherited from the "Template::Plugin::Filter" class. package MyOrg::Template::Plugin::MyFilter; use Template::Plugin::Filter; use base qw( Template::Plugin::Filter ); Then simply define your "filter()" method. When called, you get passed a reference to your plugin object ($self) and the text to be filtered. sub filter { my ($self, $text) = @_; # ...mungify $text... return $text; } To use your custom plugin, you have to make sure that the Template Toolkit knows about your plugin namespace. my $tt2 = Template->new({ PLUGIN_BASE => 'MyOrg::Template::Plugin', }); Or for individual plugins you can do it like this: my $tt2 = Template->new({ PLUGINS => { MyFilter => 'MyOrg::Template::Plugin::MyFilter', }, }); Then you "USE" your plugin in the normal way. [% USE MyFilter %] The object returned is stored in the variable of the same name, '"MyFilter"'. When you come to use it as a "FILTER", you should add a dollar prefix. This indicates that you want to use the filter stored in the variable '"MyFilter"' rather than the filter named '"MyFilter"', which is an entirely different thing (see later for information on defining filters by name). [% FILTER $MyFilter %] ...text to be filtered... [% END %] You can, of course, assign it to a different variable. [% USE blat = MyFilter %] [% FILTER $blat %] ...text to be filtered... [% END %] Any configuration parameters passed to the plugin constructor from the "USE" directive are stored internally in the object for inspection by the "filter()" method (or indeed any other method). Positional arguments are stored as a reference to a list in the "_ARGS" item while named configuration parameters are stored as a reference to a hash array in the "_CONFIG" item. For example, loading a plugin as shown here: [% USE blat = MyFilter 'foo' 'bar' baz = 'blam' %] would allow the "filter()" method to do something like this: sub filter { my ($self, $text) = @_; my $args = $self->{ _ARGS }; # [ 'foo', 'bar' ] my $conf = $self->{ _CONFIG }; # { baz => 'blam' } # ...munge $text... return $text; } By default, plugins derived from this module will create static filters. A static filter is created once when the plugin gets loaded via the "USE" directive and re-used for all subsequent "FILTER" operations. That means that any argument specified with the "FILTER" directive are ignored. Dynamic filters, on the other hand, are re-created each time they are used by a "FILTER" directive. This allows them to act on any parameters passed from the "FILTER" directive and modify their behaviour accordingly. There are two ways to create a dynamic filter. The first is to define a $DYNAMIC class variable set to a true value. package MyOrg::Template::Plugin::MyFilter; use base 'Template::Plugin::Filter'; our $DYNAMIC = 1; The other way is to set the internal "_DYNAMIC" value within the "init()" method which gets called by the "new()" constructor. sub init { my $self = shift; $self->{ _DYNAMIC } = 1; return $self; } When this is set to a true value, the plugin will automatically create a dynamic filter. The outcome is that the "filter()" method will now also get passed a reference to an array of postional arguments and a reference to a hash array of named parameters. So, using a plugin filter like this: [% FILTER $blat 'foo' 'bar' baz = 'blam' %] would allow the "filter()" method to work like this: sub filter { my ($self, $text, $args, $conf) = @_; # $args = [ 'foo', 'bar' ] # $conf = { baz => 'blam' } } In this case can pass parameters to both the USE and FILTER directives, so your filter() method should probably take that into account. [% USE MyFilter 'foo' wiz => 'waz' %] [% FILTER $MyFilter 'bar' biz => 'baz' %] ... [% END %] You can use the "merge_args()" and "merge_config()" methods to do a quick and easy job of merging the local (e.g. "FILTER") parameters with the internal (e.g. "USE") values and returning new sets of conglomerated data. sub filter { my ($self, $text, $args, $conf) = @_; $args = $self->merge_args($args); $conf = $self->merge_config($conf); # $args = [ 'foo', 'bar' ] # $conf = { wiz => 'waz', biz => 'baz' } ... } You can also have your plugin install itself as a named filter by calling the "install_filter()" method from the "init()" method. You should provide a name for the filter, something that you might like to make a configuration option. sub init { my $self = shift; my $name = $self->{ _CONFIG }->{ name } || 'myfilter'; $self->install_filter($name); return $self; } This allows the plugin filter to be used as follows: [% USE MyFilter %] [% FILTER myfilter %] ... [% END %] or [% USE MyFilter name = 'swipe' %] [% FILTER swipe %] ... [% END %] Alternately, you can allow a filter name to be specified as the first positional argument. sub init { my $self = shift; my $name = $self->{ _ARGS }->[0] || 'myfilter'; $self->install_filter($name); return $self; } [% USE MyFilter 'swipe' %] [% FILTER swipe %] ... [% END %] EXAMPLE
Here's a complete example of a plugin filter module. package My::Template::Plugin::Change; use Template::Plugin::Filter; use base qw( Template::Plugin::Filter ); sub init { my $self = shift; $self->{ _DYNAMIC } = 1; # first arg can specify filter name $self->install_filter($self->{ _ARGS }->[0] || 'change'); return $self; } sub filter { my ($self, $text, $args, $config) = @_; $config = $self->merge_config($config); my $regex = join('|', keys %$config); $text =~ s/($regex)/$config->{ $1 }/ge; return $text; } 1; 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. SEE ALSO
Template::Plugin, Template::Filters, Template::Manual::Filters perl v5.12.1 2009-07-04 Template::Plugin::Filter(3)
All times are GMT -4. The time now is 07:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy