Sponsored Content
Full Discussion: Eval command help
Top Forums Shell Programming and Scripting Eval command help Post 302472161 by Franklin52 on Tuesday 16th of November 2010 12:15:00 PM
Old 11-16-2010
Code:
myvar=$(< myfile)
ping $myvar

or:
Code:
ping "$(< myfile)"

This User Gave Thanks to Franklin52 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Access to database/eval command

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

Effect of using eval to execute a command as opposed to writing it on the commandline

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

assignment to variable from eval command

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

Strange result of eval, how does eval really work with ssh?

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

Help with perl eval command .....

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

Error in eval eval command to print html tags

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

Error in eval eval command to print html tags

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

Usage of '-' in eval command.

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

Eval command with space, quote and bracket characters

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

[BASH] eval command not expanding variables as expected.

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
SMBTORTURE(1)							    Test Suite							     SMBTORTURE(1)

NAME
smbtorture - Run a series of tests against a SMB server SYNOPSIS
smbtorture {//server/share} [-d debuglevel] [-U user%pass] [-k] [-N numprocs] [-n netbios_name] [-W workgroup] [-o num_operations] [-e num files(entries)] [-O socket_options] [-m maximum_protocol] [-L] [-c CLIENT.TXT] [-t timelimit] [-C filename] [-A] [-p port] [-s seed] [-f max_failures] [-X] {BINDING-STRING|UNC} {TEST1} [TEST2] [...] DESCRIPTION
smbtorture is a testsuite that runs several tests against a SMB server. All tests are known to succeed against a Windows 2003 server (?). Smbtorture's primary goal is finding differences in implementations of the SMB protocol and testing SMB servers. Any number of tests can be specified on the command-line. If no tests are specified, all tests are run. If no arguments are specified at all, all available options and tests are listed. Binding string format The binding string format is: TRANSPORT:host[flags] Where TRANSPORT is either ncacn_np for SMB, ncacn_ip_tcp for RPC/TCP or ncalrpc for local connections. 'host' is an IP or hostname or netbios name. If the binding string identifies the server side of an endpoint, 'host' may be an empty string. 'flags' can include a SMB pipe name if using the ncacn_np transport or a TCP port number if using the ncacn_ip_tcp transport, otherwise they will be auto-determined. other recognised flags are: sign enable ntlmssp signing seal enable ntlmssp sealing connect enable rpc connect level auth (auth, but no sign or seal) validate enable the NDR validator print enable debugging of the packets bigendian use bigendian RPC padcheck check reply data for non-zero pad bytes For example, these all connect to the samr pipe: o ncacn_np:myserver o ncacn_np:myserver[samr] o ncacn_np:myserver[\pipe\samr] o ncacn_np:myserver[/pipe/samr] o ncacn_np:myserver[samr,sign,print] o ncacn_np:myserver[\pipe\samr,sign,seal,bigendian] o ncacn_np:myserver[/pipe/samr,seal,validate] o ncacn_np: o ncacn_np:[/pipe/samr] o ncacn_ip_tcp:myserver o ncacn_ip_tcp:myserver[1024] o ncacn_ip_tcp:myserver[1024,sign,seal] o ncalrpc: UNC Format The UNC format is: //server/share OPTIONS
-d debuglevel Use the specified Samba debug level. A higher debug level means more output. -U user%pass Use the specified username/password combination when logging in to a remote server. -k Use kerberos when authenticating. -W workgroup Use specified name as our workgroup name. -n netbios_name Use specified name as our NetBIOS name. -O socket_options Use specified socket options, equivalent of the smb.conf option "socket options". See the smb.conf(5) manpage for details. -m max_protocol Specify the maximum SMB dialect that should be used. Possible values are: CORE, COREPLUS, LANMAN1, LANMAN2, NT1 -s seed Initialize the randomizer using seed as seed. -L Use oplocks. -X Enable dangerous tests. Use with care! This might crash your server... -t timelimit Specify the NBENCH time limit in seconds. Defaults to 600. -p ports Specify ports to connect to. -c file Read NBENCH commands from file instead of from CLIENT.TXT. -A Show not just OK or FAILED but more detailed output. Used only by DENY test at the moment. -C filename Load a list of UNC names from the specified filename. Smbtorture instances will connect to a random host from this list. -N numprocs Specify number of smbtorture processes to launch. -o num_operations Number of times some operations should be tried before assuming they're output is consistent (default:100). -e num_files Number of entries to use in certain tests (such as creating X files) (default: 1000). -f max_failures Number of failures before aborting a test (default: 1). VERSION
This man page is correct for version 4.0 of the Samba suite. SEE ALSO
Samba AUTHOR
This utility is part of the Samba[1] suite, which is developed by the global Samba Team[2]. smbtorture was written by Andrew Tridgell. This manpage was written by Jelmer Vernooij. NOTES
1. Samba http://www.samba.org/ 2. Samba Team http://www.samba.org/samba/team/ Samba 4.0 06/17/2014 SMBTORTURE(1)
All times are GMT -4. The time now is 12:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy