My AJAX lead was helpful. I went to my professor about it and he showed me a few things and I've come up with the code below (with a good bit of help from my professor). I was able to get it to accomplishing what I wanted, then I broke it . Currently I have it activate as a result of a mouseover and it sorta works but its returning null value now. I must be missing something simple so I would appreciate a second set of eyes.
My javascript code
My shell script
I do realize this way of going about it may be out of scope of Unix help forum but I do appreciate the help.
Hello all,
i have a infile.txt text file which contains such variables:
aaa 123
asds 1323
asdsd 13434
lkjlkj 324324
23432 lkjlkj
24324 ljlkj
3j4lk 234kj3
and i want to pass them to my script such as:
./myscript $1 $2
where $1 is the first value in the first row and $2 is the second... (2 Replies)
Hi..
I am passing a variable in my shell function. I need to access it for an isql comand in the shell script.
However the isql o/p gives no results if i pass a variable in the command. The isql command works perfectly fine if i hardcore the table name.
My script is :
... (0 Replies)
nawk '($1 ~ "1000") && ($1 ~ "5665" ) { sub ($6,"89");flag =1;print }' old.txt >> new.txt I want to set a flag in awk , if the both conditions are met. I want to pass this flag to shell Can anyone please help me on this (1 Reply)
I noticed my script is not passing the value of variable alert to the rsh command. I need some assistance, please. This is a solaris environement. Thanks! :confused:
#!/bin/sh
echo -n "Alert number:"
read alert
rsh rhost_name 'egrep $alert /opt/var/log/*.logs' (2 Replies)
Hi,
I need to pass a gnuplot value to a shell script. I have a main shell script (Main.sh) that has a bunch of gnuplot commands. Main.sh calls another gnuplot script (Child.gnu). A part of the code in Child.gnu is as follows:
sp '</data/src/scripts/results/plot_data.sh $col' u (A):2:3 w pm3d... (8 Replies)
Hello,
I have two files File1 & File2.
File1
76 135
136 200
250 345
....
File2
1 24
1 35
1 36
1 72
....
I want to get all the values form File2 corresponding to the range in File 1 and feed it to a program. Is the code below right? Can I pass shell variables to awk in this... (2 Replies)
Hi.
I need to parse file and assign some values to variables, right now i do like below
MYHOMEDIR=`awk '/Home/ {print $NF}' output.txt`
MYSHELL=`awk '/Shell/ {print $NF}' output.txt`
PRGRP=`awk '/Primary/ {print $NF}' output.txt`
SECGRP=`awk '/Second/ {print $NF}' output.txt`
In this... (10 Replies)
Hi All,
Iam trying to pass global shell variables and is not working
Main script is like below
CYEAR=`date +"%y"`
CFYEAR=`date +"%Y"`
CMONTH=`date +"%m"`
if
then
PMONTH=12
PYEAR=`expr $CYEAR - 1`
PFYEAR=`expr $CFYEAR - 1`
else
PMONTH=`expr... (6 Replies)
ok so I have a file on a website. this file is a plain text file
i need to be able to update the contents of this file from any internet enabled unix box.
does anyone have ideas on how it can be done, without using scp/ftp?
i know wget can be used to download the file:
wget... (3 Replies)
Discussion started by: SkySmart
3 Replies
LEARN ABOUT DEBIAN
text::micromason::allowglobals
MicroMason::AllowGlobals(3pm) User Contributed Perl Documentation MicroMason::AllowGlobals(3pm)NAME
Text::MicroMason::AllowGlobals - Share package vars between templates
SYNOPSIS
Instead of using this class directly, pass its name to be mixed in:
use Text::MicroMason;
my $mason = Text::MicroMason->new( -AllowGlobals );
Share package variables:
$mason->set_globals( '$name' => 'Bob' );
Use the standard compile and execute methods to parse and evalute templates:
print $mason->compile( text=>$template )->();
print $mason->execute( text=>$template );
Then, in a template, you can refer to those globals:
Welcome, <% $name %>!
DESCRIPTION
Public Methods
set_globals()
Accepts a list of pairs of global variable names and corresponding values.
Adds each variable name to the allowed list and sets it to the initial value.
allow_globals()
Gets or sets the variables names to be allowed.
If called with arguments, adds them to the list.
Returns the variables to be allowed as a list, or as a space-separated string in scalar context.
Supported Attributes
allow_globals
Optional array or space-separated string of global variable names to be allowed.
Private Methods
assemble()
Adds the allow_globals_statement to each token stream before assembling it.
allow_globals_statement()
This method prepends the "use vars" statement needed for the template subroutines to compile.
SEE ALSO
For an overview of this templating framework, see Text::MicroMason.
This is a mixin class intended for use with Text::MicroMason::HTMLMason.
For distribution, installation, support, copyright and license information, see Text::MicroMason::Docs::ReadMe.
perl v5.10.1 2007-01-29 MicroMason::AllowGlobals(3pm)