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)
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)
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)
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)
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. Forum Support Area for Unregistered Users & Account Problems
Hello,
I believe that the following man page contains an error: <www dot unix dot com>/man-page/posix/1posix/eval/
In section "EXAMPLES", the fourth line should probably be:
eval y='$'$x
rather than:
$fooeval y='$'$x
Regards,
Jérôme DUBOIS. (1 Reply)
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)
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)
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 SUNOS
hosts
hosts(4)hosts(4)NAME
hosts - host name database
SYNOPSIS
/etc/inet/hosts
/etc/hosts
The hosts file is a local database that associates the names of hosts with their Internet Protocol (IP) addresses. The hosts file can be
used in conjunction with, or instead of, other hosts databases, including the Domain Name System (DNS), the NIS hosts map, the NIS+ hosts
table, or information from an LDAP server. Programs use library interfaces to access information in the hosts file.
The hosts file has one entry for each IP address of each host. If a host has more than one IP address, it will have one entry for each, on
consecutive lines. The format of each line is:
IP-address official-host-name nicknames...
Items are separated by any number of SPACE and/or TAB characters. The first item on a line is the host's IP address. The second entry is
the host's official name. Subsequent entries on the same line are alternative names for the same machine, or "nicknames." Nicknames are
optional.
For a host with more than one IP address, consecutive entries for these addresses may contain the same or differing nicknames. Different
nicknames are useful for assigning distinct names to different addresses.
A call to gethostbyname(3NSL) returns a hostent structure containing the union of all addresses and nicknames from each line containing a
matching official name or nickname.
A `#' indicates the beginning of a comment; characters up to the end of the line are not interpreted by routines that search the file.
Network addresses are written in the conventional "decimal dot" notation and interpreted using the inet_addr routine from the Internet
address manipulation library, inet(3SOCKET).
This interface supports host names as defined in Internet RFC 952 which states:
A "name" (Net, Host, Gateway, or Domain name) is a text string up to 24 characters drawn from the alphabet (A-Z), digits (0-9),
minus sign (-), and period (.). Note that periods are only allowed when they serve to delimit components of "domain style names".
(See RFC 921, "Domain Name System Implementation Schedule," for background). No blank or space characters are permitted as part of a
name. No distinction is made between uppercase and lowercase. The first character must be an alpha character [or a digit. (RFC 1123
relaxed RFC 952's limitation of the first character to only alpha characters.)] The last character must not be a minus sign or
period.
Host names must not consist of numbers only. A host name must contain at least one alphabetical or special character.
Although the interface accepts host names longer than 24 characters for the host portion (exclusive of the domain component), choosing
names for hosts that adhere to the 24 character restriction will insure maximum interoperability on the Internet.
A host which serves as a GATEWAY should have "-GATEWAY" or "-GW" as part of its name. Hosts which do not serve as Internet gateways should
not use "-GATEWAY" and "-GW" as part of their names. A host which is a TAC should have "-TAC" as the last part of its host name, if it is a
DoD host. Single character names or nicknames are not allowed.
Example 1: Example of a typical line from the hosts file.
Here is a typical line from the hosts file:
192.9.1.20 gaia # John Smith
gethostbyname(3NSL), inet(3SOCKET), nsswitch.conf(4), resolv.conf(4)
/etc/inet/hosts is the official SVR4 name of the hosts file. The symbolic link /etc/hosts exists for BSD compatibility.
30 Sep 2005 hosts(4)