10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am trying to use eval command to evaluate a variable(HAPROXY_LISTENER_rabbitmq_project-test-BRHM_PORT) which consists of '-' but unfortunately the eval command is unable to interpret the value of variable and trims the variable name after '-' and produces the string output rather than the... (10 Replies)
Discussion started by: Kuldip
10 Replies
2. Shell Programming and Scripting
anyone has any info on why this is complaining???
vivek@vivek-c5e55ef2e ~/TAC
$ zoneCounter=1
vivek@vivek-c5e55ef2e ~/TAC
$ optUsage1=23%
vivek@vivek-c5e55ef2e ~/TAC
$ eval eval echo "<th>Zone $zoneCounter </th><th align=\"left\"> \$optUsage$zoneCounter </th>"
-bash: syntax error... (13 Replies)
Discussion started by: vivek d r
13 Replies
3. Shell Programming and Scripting
anyone has any info on why this is complaining???
vivek@vivek-c5e55ef2e ~/TAC
$ zoneCounter=1
vivek@vivek-c5e55ef2e ~/TAC
$ optUsage1=23%
vivek@vivek-c5e55ef2e ~/TAC
$ eval eval echo "<th>Zone $zoneCounter </th><th align=\"left\"> \$optUsage$zoneCounter </th>"
-bash: syntax error... (1 Reply)
Discussion started by: vivek d r
1 Replies
4. Shell Programming and Scripting
Hello All,
I am trying to use perl eval in a complex code and below given is a pseudo code of my logic.
Here $result evalutes to empty.
Please help.How should I retrieve of $t where $f just hold the name of varaible i.e t
$t=10;
$f='$t';
$result=eval "\$$f";
print "$result\n"; (3 Replies)
Discussion started by: prasperl
3 Replies
5. Shell Programming and Scripting
Hi all,
some small script with eval turned me to crazy.
my OS is linux
Linux s10-1310 2.6.16.53-0.8.PTF.434477.3.TDC.0-smp #1 SMP Fri Aug 31 06:07:27 PDT 2007 x86_64 x86_64 x86_64 GNU/Linux
below script works well
#!/bin/bash
eval ssh remotehost date
eval ssh remotehost ls
below... (1 Reply)
Discussion started by: summer_cherry
1 Replies
6. Shell Programming and Scripting
I have file called myfile which has the text "myserver" in it. I need to have a command to ping "myserver". How would I do that?
I tried
when I type at the terminal I get the output as . How do I do something like a ?
thanks,
Nick (5 Replies)
Discussion started by: nikhilfake
5 Replies
7. Shell Programming and Scripting
I used the eval command in shell programming for assigning a value to a stored value of a variable.
Example:
VAR="Unix_Id"
eval $VAR="101"
eval echo $"$VAR"
How can i assign a value to a stored value of a variable in perl OR how i can write above code in Perl?
I need your help... (4 Replies)
Discussion started by: kunal_dixit
4 Replies
8. Shell Programming and Scripting
Hi
i have the following code:
if(($line!=1) and (@field!='\$')){
print ( "\nTRY TO CONNECT TO DATABASE................\n");
my $dbh = DBI->connect($dsn, $user, $pass);
print ("CONNECTED TO DATABASE\n");
eval
... (1 Reply)
Discussion started by: chriss_58
1 Replies
9. Shell Programming and Scripting
Here is my perl Program:
#!/usr/bin/perl -w
my $a="sam";
my $b="ste";
my $c="abcdef";
my $d=931;
$str="
@<<<<< @>>>>>>>>>> @|||||||||||||||||||| @#########
\$a,\$b,\$c,\$d
.";
open(FILE,">abc.txt");
$temp="format FILE = $str";
eval $temp;
write FILE;
print FILE "\n\n"; (3 Replies)
Discussion started by: sameerstephen
3 Replies
10. Shell Programming and Scripting
is it possible to use eval to create constants in perl? i cannot seem to get anything to work, and my searches are turning up little to nothing. an example of what i am trying to do is this:
2 arrays:
array 1: 'FOOD','NUMBER','OS'
array 2: 'pizza','two','unix'
loop through the arrays and... (5 Replies)
Discussion started by: effigy
5 Replies