Programming :: Want To Pass Variables To Perl Script From Php Script

Jun 11, 2010

I'm using perl script from php. I wanted to pass parameters to perl script from php and also return value from perl script to php. I don't no how to do it.

View 14 Replies


ADVERTISEMENT

Programming :: Can't Pass Variables To A Program In Bash Script / Fix It?

Dec 30, 2010

Trying to do a simple bash script, and having some issues. I am relatively new to bash, and did my best to search, but idk what exactly to search for.

Doesn't work code...

View 6 Replies View Related

Programming :: Write Scripts To Pass 2 Different Variables To Find Command

Aug 18, 2010

i am trying to write scripts to pass 2 different variables to find command.

find . -name $var1 -exec grep -H $var2
find . -name CDR_2010-07-21 -exec grep -H 9892614477 {} ;

1st variable CDR_2010-07-21(passed by var1) is the file name inside which i am trying to search string 9892614477(passed by var2). i have tried following script

[code]...

View 9 Replies View Related

Programming :: Perl : Display All Variables In Use In Memory?

Jul 30, 2010

I have a large body of code (2000+ lines at this point) with lots of global variables, and a handful of locals. I would like to know is there a way to print out all global variables in use at a particular moment in time either from the debugger (ideally) or in line?

Basically I have something like this for the menu

1. Do thing 1
2. Do thing 2
3. Do thing 3
4. Do thing 1 and 2
5. Do thing 1 and 3
6. Do thing 1, 2 and 3

The problem is, as you select something from the menu again after you finish an option, the globals are still set and I'd like to clear them. If I had a list of all of them, it be easy to copy and paste and set them before the program ran another entry again. Suggestions? I'm aware of reset [a-z], but all of my vars are uppercase, and I would upset INC, and other upper case built-ins.

View 1 Replies View Related

Programming :: Sudo Perl Script With Environment Variables?

Apr 22, 2009

How to use sudo to run a perl script with the environment variable JAVA_HOME on linux?
Running testenv.pl as sudo do not pickup the environment variable JAVA_HOME
value. code...

View 1 Replies View Related

General :: Possible To Pass JavaScript Variables To Bash?

Apr 18, 2011

Can I pass javascript variables to bash script? If possible in bash script what code should I insert to receive javascript variables.

View 14 Replies View Related

Ubuntu :: C++ - Use System To Call Echo And Pass Variables?

Sep 7, 2010

I'm trying to use system to call echo and pass variables to it. That was a success. The problem is the variables inside the while-loop i wrote cannot be manipulated. what I'm doing wrong here? here's the code:

Code:
#include <iostream>
#include <stdlib.h>
#include <string>
#include <sstream>

[Code]....

View 7 Replies View Related

Programming :: Pass Variable In Mysql Qyery In C Programming?

Dec 4, 2010

i want to pass variable in mysql qyery in c programming

View 1 Replies View Related

Programming :: Define All Variables In Tcl Programming In A File For Instance Var.cfg?

Apr 27, 2010

I can define all variables in tcl programming in a file for instance var.cfgand source the same file in my tcl script such assource var.cfgIs this possible in perl too?

View 3 Replies View Related

Programming :: C++ Failing To Pass By Value?

Jan 25, 2010

I have a strange problem with a simple program. I have a container class that holds a pointer. I did this so I could use another container class that does several pass by value calls. I didn't want to be copying the object over and over again, so decided to build this simple container that simply copied the pointer in the copy constructor.

However, the pass by value call seems to be failing in a strange way. When the pass-by-value function is called, the program jumps into the copy constructor just fine and performs the pointer assignment operation. The program will copy the pointer value 0x20 (for argument sake) to the "this->base" location. Within the copy constructor, this has the address 0x28. Then when it jumps into the function, instead of pass by value argument being at 0x28 (as expected), it is at 0x36. Then 0x36->base has the address 0x28. Thus the base is now pointing at what was the new pointer container. At this point the data is corrupted and random things happen.

It seems that there is some strange assignment and double nesting going on. I really do not understand what is going on.

Below is some code. I have stripped away all the other code trying to isolate the problem. I have added comments explaining what my debugger is telling me.

Code:
using namespace std;
class paramPnt // Need to determine how order is tracked
{
private:
long order;

[Code].....

View 4 Replies View Related

Programming :: JNI - How To Pass STL Structures

Jun 17, 2011

I hace some code C/C++ STL, which i need to use for android, using SDK-NDK-JNI.my problem is that i need to pass some STL structures across JNI, I can't pack/unpack data into basic types or arrays of basic types, doing my own simple streaming between the two layers.My application need to pass a pointer to a STL structure which is updated by eachuser interaction wonder if it is possible using NDK-JNI ?Other option is "native activity" but it also needs JNI in some way ... and passing the STL structures wille a requirement, yet.I only can package data into an own streaming if there is a second (concurrent) application running (implementing the STLfunctionality). Is it possible ?

View 1 Replies View Related

Programming :: Pass Variable Between Scripts?

Mar 9, 2011

I need to pass variable from sc1.sh to sc2.sh and update the value of the passed variable in sc2.sh and then return the updated value of the variable from sc2.sh to sc1.sh.

View 7 Replies View Related

Programming :: Pass In Mandatory Arguments First?

Jun 9, 2011

I am using getopts to take parse optional arguments but i also pass in mandatory arguments first

[code]
#!/bin/bash
print_usage()
{
perror "$@"
}
arg1="$1"
arg2="$2"
shift 2
[Code]....

View 8 Replies View Related

Programming :: Pass A Path As A String To A Variable?

Apr 17, 2009

I'm trying to pass a path as a string to an array, but its evaluating it as a command instead. I want to take the literal string "/mnt/accounts/user/temp/*.jpg" and assign it to an array{1}, but when i echo the array variable, it displays it as

pic1.jpg
pic2.jpg
pic3.jpg

[code]....

I just want it to be the actual text "/mnt/accounts/user/temp/*.jpg" which i will be combining with other text to create a longer path elsewhere in the code.

View 5 Replies View Related

Programming :: Pass Arguments To A Function Using A Loop

Mar 1, 2010

I need to pass a large number of arguments to a function which takes variable number of arguments, such as gtk_list_store_new. But it doesn't look nice if i write something like gtk_list_store_new(NUM,TYPE_A,TYPE_B,TYPE_C,...,TYPE_OMEGA); because of large number of arguments. And, it will be a trouble to change number of columns because of need to manually change arguments to large number of such functions. So, how can i pass all the arguments to a function using a loop? Something like

Code:
for(i=0;i<NUM;i++)
{
push_arg(args[i]);
}
call_function(func);
?

Of course, i could just use asm code for this, but is there a portable way of doing so?

P.S. i mean C language.

View 2 Replies View Related

Programming :: Pass Arguments To Binary Cgi Program?

Mar 5, 2010

My hosting server does not allow exec() or system() calls, for security reasons. I can call a cgi process in two ways. From a .shtml page, i can issue a directive like code...

View 11 Replies View Related

Programming :: How To Pass Sed Address By Shell Variable

Aug 2, 2011

Code...

I am somewhat confident that there is a neater way.

Question: Does anybody know the answer?

View 3 Replies View Related

Programming :: Take The Png Images In A Folder And Pass Them To ClusterImage?

Jun 22, 2010

I am building a pipeline for image processing. I would like to be able to take the png images in a folder and pass them to clusterImage.pl once that is done I would like to then pass the outputted file to seperateObjects.pl the outputted file is of the same name but has kmeansOutput.all.matrix attached to the end. Below is what I have so far, but it is not working.

#!/bin/bash
#This script will take in an image and a matrix file.
#The output will be an image and a matrix file.
list=`ls *.png`
for i in $list

[Code].....

View 7 Replies View Related

Programming :: Pass A Shell Variable To An AWK Command?

Dec 23, 2010

I have the following code :

Code:
E_BADARGS=65
if [ $# -ne 2 ] ; then

[code]...

View 1 Replies View Related

Programming :: Pass Array To Window.openDialogue?

Mar 21, 2010

I have an array...n i want to display it as a popup window ...the array elements...as buttons that are clickable...

so can i pass an array to the window as argument..i know we can pass parameter values..but array?and is so how can the individual array elements be accessed inside the window?

View 4 Replies View Related

Programming :: Pass Variable From One Shell Script Into Another

Oct 2, 2009

I have some messy code that I wrote a while back and I am trying to organize it. The program opens xpaint and uses xwit and xte to draw packman and so on. I want to split it all up I am going to add more to it. Basically like i would want drawing packman in one function i guess you could call it and then coloring him or the background in another

<code>
#!/bin/bash
pkill xpaint
res=`xwininfo -root | grep geom | sed -e 's/^.*try ([0-9][0-9]*x[0-9][0-9]*)+.*$/1/'`
Xoriginal=`echo $res | cut -d 'x' -f 1`
Yoriginal=`echo $res | cut -d 'x' -f 2`

X=`echo "($Xoriginal/2)-400" | bc `
Y=`echo "$Yoriginal/2" | bc `
#t=$(($Y/2))
bob=`echo "$Y/2" |bc `
echo $X
echo $Y

/usr/bin/xpaint -size "$Xoriginal"x"$Yoriginal" -popped &
sleep 4
paintersMom=`xwit -all -print | grep XP | cut -d ":" -f 1`
canvasWin=`xwit -all -print | grep Untitled | cut -d ":" -f 1`
#toolres=`xwininfo -id $paintersmom | grep geom | sed -e 's/^.*try ([0-9][0-9]*x[0-9][0-9]*)+.*$/1/'`
#canres=`xwininfo -id $canvasWin | grep geom | sed -e 's/^.*try ([0-9][0-9]*x[0-9][0-9]*)+.*$/1/'`

#echo $paintersMom
xwit -id $paintersMom -move 0 0
xwit -id $canvasWin -move 0 0
xwit -root -warp "$X" "$Y"
sleep 4
for((i=45; i < 315; i++))
do
xte 'mousedown 1'
ang=`./deg2rad $i`

movex=`echo "$X+$bob*c($ang)" | bc -l`
movey=`echo "$Y+$bob*s($ang)" | bc -l`
xwit -root -warp "$movex" "$movey"
done
xwit -root -warp "$X" "$Y"
xte 'mouseup 1'

#xwit -id $paintersMom -focus -raise
#sleep 1
#xwit -id $paintersMom -warp 30 390 #// fill in command on tool bar
#sleep 1
#xte 'mouseclick 1'
#sleep 1
#xwit -id $canvasWin -warp 221 40 #// color selection
#sleep 1
#xte 'mouseclick 1'
#sleep 1
#xwit -id $canvasWin -warp "$(($X-150))" "$Y" #//location on pac man
#sleep 1
#xte 'mouseclick 1'
#sleep 1

#xwit -id $canvasWin -warp 62 44 #// selecting color black
#sleep 1
#xte 'mouseclick 1'
#sleep 1
#xwit -root -warp 62 120 #// selecting back to canvas
#sleep 1
#xte 'mouseclick 1' #// color canvas black
#sleep 1
#xwit -id $paintersMom -focus -raise
#xwit -id $paintersMom -warp 27 108 #//click back to pencil
#sleep 1
#xte 'mouseclick 1'
#sleep 1
</code>

Here for example $paintersmom is would be in the drawing of pacman but I would also want to use it when I colored him in.. but I would want both processes in a different shell script.

View 15 Replies View Related

Programming :: Pass _server Variable To Html?

Dec 20, 2010

This is a section on a php file running within a a Joomla module. I have the following code:

Code:
<?php echo '</div>'; ?>
<html>

[code]....

View 2 Replies View Related

Programming :: PHP - Pass Session To Iframe On Same Page?

Oct 4, 2009

Page.php -- has a special division thats empty and on Link Click calls Javascript to change inner.html to an IFRAME call So the user clicks the link and then it shows the division and loads the IFRAME The IFRAME Source is iframe.php in IFRAME.PHP I need to take the Session Variables that were set already in Page.php all sessions work fine when not using Iframe (open iframe.php in its own window) but doesnt work when its Iframed and sadly I have to use Iframe on this page NOW the CATCH is -- I CANNOT use any POST or GET Values the iframe src MUST be straight url to the page [URL] cannot use variables in the url [URL] etc..


IS it possible to do what I need Without passing variables via the url? Page1 has all session variables set, calls the iframe command when users presses a button, Iframe loads but DOES not have the Session data that was saved on Page1 -- and IFRAME cannot pass variables via the URL it must be a direct url to the page only Page1.php java used to set the HTML / IFRAME into its Div

Code:

<script>
function changeText(){
document.getElementById('iframediv').innerHTML = "<iframe scrolling='no' frameborder='0' margin='0' src='http://mypage.blah/iframe.php'></iframe>";

[code]....

View 2 Replies View Related

Programming :: Setting Variables In C-shell?

Jul 12, 2010

I'm running into a problem when I try to set a variable to an awk output in c-shell. Right now my command is Code: set STR_MSG_TYPE = `awk -F{ '/msg_type/ {print $2}' <filename> | tr -d }'/''*' ` I then run echo to see what the output is and it returns blank, however, when I run the same awk command from the command line, I get an actual output of "MT-715". Am I setting my variable incorrectly? I do something similar using the date command to set a STR_DATE variable earlier in the code and it works fine and I use the same syntax.

View 1 Replies View Related

Programming :: C With Gcc: Are All Variables Defined Like Pointers

Sep 13, 2010

i'm practicing in very basic c programs using the gcc compiler.I found that when i create two variables let's say

Code:

int a,b and Code: a=15;
b=3;
a=b;
b--;

then a equals 2.I thought that this isn't normal in C isn't it?I haven't had the time to read the gcc documentation yet...so i think it has something to do with my compiler's default settings.I use the

Code: gcc filename.c -o filename command to compile

Are all variables defined like pointers?

View 5 Replies View Related

Programming :: How To Check For Empty Variables In PHP

Apr 26, 2010

I want to check if a MySQL db query will return an empty result - I first do this:

$query="SELECT * from <whatever" ;
$result=mysql_query($query) ;
$row=mysql_fetch_row($result) ;

Now how do I check if $row is empty or not? Will $row="" do the trick?

View 2 Replies View Related

Programming :: Get List Of Variables Of Particular Type ?

Jun 13, 2011

I have a C header file which have arrays of predefined(known) structure type. But i dont have names of arrays and their size. when i include that file and compile my application, i want to know the names and sizesof those arrays.

purpose of application is to get the content of those arrays and to explain it in descriptive words instead of hex numbers.ofcourse this can be done by file pointers and reading also with out header file inclusion, but as i am working in C, once compiled, those variables are in my address space in i include header file.

View 5 Replies View Related

Programming :: Passing Variables By Reference?

Mar 19, 2010

I was trying to make a code for passing variables by reference..here's the code:

#include<iostream>
using namespace std;
void fun(int& ,int& );
int main(){

[Code].....

invalid initialization of non-const reference of type 'int&' from a temporary of type 'int*'

View 9 Replies View Related

Programming :: PHP Accessing Variables Within Array

Mar 30, 2011

I am pretty new to PHP so excuse my dumbness. I've searched this up in quite a few places and cant find anything : Basically, I've made an array, within it are 3 more arrays. Their are two values in each array, 'Name' and 'Age'. Basically I am using a While statement to try and cycle through the 'age' value of my array and state whether or not the person is eligible. (I am actually just learning so I'm doing this to just test myself).

Here is my code
Code:
<?php
$people =array(
array('name' => 'Bob', 'age' => 15 ),
array('name' => 'Jhon' , 'age' => 10),
array('name' => 'Sue' , 'age' => 7));
//($value =& $people[0,1,2][age] );

Here was an attempt to try and create a reference to age, I tried it many different ways
while($age < 10) {
echo ('$name, is eligible') ; } ?>

Okay, so I tried to do this through two ways, one way I tried to create a reference to age, then evaluate it, without that line of code their would be no reference, which way is correct, why wont it work? I am using Xammp, so when I launch local host I get an undefined variable error. What To Do?

View 3 Replies View Related

Programming :: PHP - How To Parse Data Into Variables

Apr 17, 2011

My php knowledge is very poor (only worked with strings so far), and I am faced which a task that is a real challenge for me: I have a variable, that contains data of different type, in this order: byte, byte, string, string, string, string, short, byte, byte, byte, byte, byte, byte, byte, string.

Strings are of variable length. How could this data be parsed into variables of the right type, and then all converted to strings? What are the functions to use? Strings are unicode ones, and they are delimited by "

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved