11-16-2010
Eval command help
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
10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
cmd='date | wc' or cmd="date | wc"
$cmdIf this script is executed, an error is generated. The reason written was that "The execution fails because the pipe is not expanded and is passed to date as an argument". What is meant by expansion of pipe. When we execute date | wc on the command line, it... (2 Replies)
Discussion started by: daudiam
2 Replies
3. Shell Programming and Scripting
Hi Gurus,
I am having 2 parameters as below
parm1=value1
parm2=parm1
I want to evaluate parm1 value using eval echo \$$parm2 and later i want to assign this value to other variable which i will be using in if statement like :
if ]; then
do this.......
fi
could you please suggest... (5 Replies)
Discussion started by: k_vikash
5 Replies
4. 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
5. Shell Programming and Scripting
Hi All,
I read the above written code (perl code) in another perl script and evaluates this code for each line of text file,but using exit statement in code make this not to work and i could not get the desired results. However if i use return it works fine. I just need to know why it doesn't... (1 Reply)
Discussion started by: sarbjit
1 Replies
6. 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
7. 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
8. 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
9. Shell Programming and Scripting
Hi,
I am Pradnya Gandhe trying to use in shell script.
I want to use a bit complicated command using eval command in a shell script.
<path to>\wsadmin.sh -lang jython -conntype NONE -c "AdminApp.install('war file path', '] -MapWebModToVH ] -MapRolesToUsers ] ]')"
Works correctly as expected... (2 Replies)
Discussion started by: Pradnya Gandhe
2 Replies
10. UNIX for Beginners Questions & Answers
Hi Guys,
I wrote a collection of bash functions years ago and now need to use them again but
I'm getting some error messages when eval tries to expand the variables names.
I recollect that I used the shopt command to set one of the options but I can't quite
remember the command that I... (8 Replies)
Discussion started by: ASGR
8 Replies
LEARN ABOUT DEBIAN
bup-on
bup-on(1) General Commands Manual bup-on(1)
NAME
bup-on - run a bup server locally and client remotely
SYNOPSIS
bup on <hostname> index ...
bup on <hostname> save ...
bup on <hostname> split ...
DESCRIPTION
bup on runs the given bup command on the given host using ssh. It runs a bup server on the local machine, so that commands like bup save
on the remote machine can back up to the local machine. (You don't need to provide a --remote option to bup save in order for this to
work.)
See bup-index(1), bup-save(1), and so on for details of how each subcommand works.
This 'reverse mode' operation is useful when the machine being backed up isn't supposed to be able to ssh into the backup server. For
example, your backup server can be hidden behind a one-way firewall on a private or dynamic IP address; using an ssh key, it can be autho-
rized to ssh into each of your important machines. After connecting to each destination machine, it initiates a backup, receiving the
resulting data and storing in its local repository.
For example, if you run several virtual private Linux machines on a remote hosting provider, you could back them up to a local (much less
expensive) computer in your basement.
EXAMPLES
# First index the files on the remote server
$ bup on myserver index -vux /etc
bup server: reading from stdin.
Indexing: 2465, done.
bup: merging indexes (186668/186668), done.
bup server: done
# Now save the files from the remote server to the
# local $BUP_DIR
$ bup on myserver save -n myserver-backup /etc
bup server: reading from stdin.
bup server: command: 'list-indexes'
PackIdxList: using 7 indexes.
Saving: 100.00% (241/241k, 648/648 files), done.
bup server: received 55 objects.
Indexing objects: 100% (55/55), done.
bup server: command: 'quit'
bup server: done
# Now we can look at the resulting repo on the local
# machine
$ bup ftp 'cat /myserver-backup/latest/etc/passwd'
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
...
SEE ALSO
bup-index(1), bup-save(1), bup-split(1)
BUP
Part of the bup(1) suite.
AUTHORS
Avery Pennarun <apenwarr@gmail.com>.
Bup unknown- bup-on(1)