Below are three variables, which I want to pass into variable RESULT1
username1=userid
poihostname1=dellsys.com
port1=8080
How can I pass these variables into below code...
I am trying to close of multiple users in an Oracle database. Each users has records in multiple tables what I need to do is use a script that call each SQL seperately passing either CLI arguments or gathered arguments from the users during run time.
## Accept variable(s) from the command line... (1 Reply)
Hi,
I am trying to pass some of the variables in my shell scripts to the sqlplus call and use them as parameters.
For example, I would like to replace the 'SAS', and '20050612' with $var1 and $var2, respectively, how can I do that?
--------------------------------------------------------... (1 Reply)
Hi ..
I have a dynamic script called from a programming language called Powerhouse (4GL).
The module, called QUIZ, allows the user to call shell commands from within it...
i.e.
!rm -f mipss156t2cmd1.bat mipss156t2tmp1.txt
!printf '#!/bin/csh\n' > mipss156t2cmd1.bat
!printf 'setenv... (0 Replies)
Hi...
Actually, I want to pass a few variables to the function and print it. But, its looks like not working. Could some body help me how could i do that ?... below is my program...
#!/usr/bin/ksh
usage()
{
echo "Usage: $0 -n -a -s -w -d"
exit
}
rename()
{
echo "rename $1 $2"... (5 Replies)
Hi!I'm trying to write a script in C that Asterisk must call: I would to pass to the script a number digited by the user, make some elaboration with it and then pass the result to Asterisk. I don't understand the mechanism used by Asterisk to pass variable to/from a script: I know that variables... (1 Reply)
HI all
I am calling a script "b" from script "a". In script "a", i connect to database and get month and year. I have to pass these same values to script b. How can i do that. How can i pass parameters from one script to another (3 Replies)
I have a perl script that opens a text file containing numbers on each line:
for example:
755993
755994
755995
755996
755997
755998
The perl script takes these numbers and store them as an array @raw_data, where I can access individual numbers by using $raw_data for the value 755993.... (2 Replies)
Hi All,
I need to frame a unix script to logon to a unix box. The credentials needs to be obtained from a property file on the same location.
I am trying to use 'expect' and 'spawn' command to meet this req.
When I am passing values, these commands are working fine. but when I am trying to... (3 Replies)
Hi All,
How to pass the variable to s3cmd put command? I'm trying to use this command in a script as below:
s3cmd put ${upload_path} s3://${upload_dest}
where
With the above command in script, the file is not getting uploaded.
Please help!!! (4 Replies)
Hello, I have two bash scripts like the following:
script 1:
#!/bin/bash
var=WORLD
bash path/to/second/script/script2.bash
script 2:
#!/bin/bash
echo "HELLO $var"
I expected the output to be "HELLO WORLD" but instead, I get "HELLO". I understand that when I envoke another bash... (2 Replies)
Discussion started by: jl487
2 Replies
LEARN ABOUT DEBIAN
text::micromason::passvariables
MicroMason::PassVariables(3pm) User Contributed Perl Documentation MicroMason::PassVariables(3pm)NAME
Text::MicroMason::PassVariables - Pass template data as variables
SYNOPSIS
Instead of using this class directly, pass its name to be mixed in:
use Text::MicroMason;
my $mason = Text::MicroMason->new( -PassVariables );
Use the standard compile and execute methods to parse and evalute templates:
print $mason->compile( text=>$template )->( 'name'=>'Dave' );
print $mason->execute( text=>$template, 'name'=>'Dave' );
Templates can now access their arguments as global variables:
Welcome, <% $name %>!
DESCRIPTION
Like Text::Template, this package passes in template arguments as package variables. For example, if you pass in an argument list of "foo
=> 23", it will set the variable $foo in the package your template is compiled in. This allows template code to refer to $name rather than
$ARGS{name}.
The strict pragma is disabled to facilitate these variable references.
Caution: Please note that this approach has some drawbacks, including the risk of clobbering global variables used for other purposes. It
is included primarily to allow the TextTemplate module to emulate the behavior of Text::Template, and for quick-and-dirty simple templates
where succinctness is more important than robustness.
Supported Attributes
package
Target package namespace. Defaults to Text::MicroMason::Commands.
Private Methods
assembler_rules()
Adds Perl fragments to handle package and symbol table munging.
assemble()
Modifies Perl subroutine to embed the target package namespace.
install_args_hash()
Performs symbol table munging to transfer the contents of an arguments hash into variables in a target namespace.
SEE ALSO
The interface being emulated is described in Text::Template.
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 2010-03-05 MicroMason::PassVariables(3pm)