08-22-2013
I want to compare to alphanumeric value in a unix shell script.
[CODE]#!/bin/sh
b= SERVER
if ["$a" == "$h"];
then
echo "hostname $a is same"
____________________________
Last edited by Nsharma3006; 08-25-2013 at 05:49 PM..
Reason: Moved to own thread; added code tags
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi
I face the problem the if else statement dint return correct result for me
my script as below:
#!/bin/ksh
sqlplus -s /nolog <<EOF
connect databaseuser/password
column num new_value num format 9999
set head off
select count(*) num from table1;
exit num
EOF
if ; then
echo "$?"... (6 Replies)
Discussion started by: jaseloh
6 Replies
2. Shell Programming and Scripting
Hi
How to compare created or modified date of two files
help needed
thanks
Vajiramani :) (9 Replies)
Discussion started by: vaji
9 Replies
3. Shell Programming and Scripting
Iam trying to compare the string in if else... but some how its not working
following is the code
On executing the above one its giving a error message ': bad number'
in the above parameter l & k are numbers and dbfiles and patchefiles are array
If i do echo ift working fine
... (2 Replies)
Discussion started by: kiranlalka
2 Replies
4. Shell Programming and Scripting
how to compare two lines using shell script? (1 Reply)
Discussion started by: suman_dba1
1 Replies
5. Shell Programming and Scripting
grep "HP_nv6005ud" mail_log.log | awk '{print $2}' >raju.log
if
then
grep "$testdate" raju.log
if
Hi in the above script $2 gives rge today date. and $ydate is yesterdays date.
not in the if condition i need to compare both the dates.
Please help me in this.
Thanks in... (7 Replies)
Discussion started by: intiraju
7 Replies
6. Shell Programming and Scripting
Can someone please help me out here?
I have strings similar to aafafaff45,29.34.942.45,edfdfafa that i want to compare to another similar string to check if they are the same. my script isn't working.
ONE="aafafaff45,29.34.942.45,edfdfafa"
TWO="ddfafagfa,87.57.942.45,afafafff"
if ONE is... (5 Replies)
Discussion started by: SkySmart
5 Replies
7. Shell Programming and Scripting
I have a directory with about 6 files that we receive regularly. these 6 files contain information for 3 different units, 2 for each unit. files related to a specific unit are named similarly with a change in number at the end of the file. the numbers should be sequential. for each grouping of... (3 Replies)
Discussion started by: scriptman237
3 Replies
8. Shell Programming and Scripting
Hi there,
I want to compare 2nd column which are alphanumeric values from each of the 2 files i.e.,lspv_pre.out and lspv_post.out , if found echo some message.
lspv_pre.out
hdisk0 00c39eaa451144dd rootvg active
hdisk1 00c39eaa45223322 ... (3 Replies)
Discussion started by: mbak
3 Replies
9. Shell Programming and Scripting
HI All,
I am new to Unix shell scripts..
Could you please post the unix shell script for for the below request.,
There are two different tables(sample1, sample2) in different schemas(s_schema1, s_schema2).
Unix shell script to compare the columns of two different tables of two... (2 Replies)
Discussion started by: Rajkumar Gopal
2 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I will be having file names like below,
1420SP1.01804
1420SP1.01805D
1420SP1.01805
1420SP1.01806D
1420SP1.01806
1420SP1.01901D
1420SP1.01901
1420SP1.01902D
1420SP1.01902
1420SP1.01903D
1420SP1.01903
1420SP1.01904
1420SP1.01905
From this, I need to list file names which is... (3 Replies)
Discussion started by: Sumanthsv
3 Replies
LEARN ABOUT MOJAVE
net-server5.18
NET-SERVER(1) User Contributed Perl Documentation NET-SERVER(1)
NAME
net-server - Base Net::Server starting module
SYNOPSIS
net-server [base type] [net server arguments]
net-server PreFork ipv '*'
net-server HTTP
net-server HTTP app foo.cgi
net-server HTTP app foo.cgi app /=bar.cgi
net-server HTTP port 8080 port 8443/ssl ipv '*' server_type PreFork --SSL_key_file=my.key --SSL_cert_file=my.crt access_log_file STDERR
DESCRIPTION
The net-server program gives a simple way to test out code and try port connection parameters. Though the running server can be robust
enough for full tim use, it is anticipated that this binary will just be used for basic testing of net-server ports, acting as a simple
echo server, or for running development scripts as CGI.
OPTIONS
"base type"
The very first argument may be a Net::Server flavor. This is given as shorthand for writing out server_type "ServerFlavor".
Additionally, this allows types such as HTTP and PSGI, which are not true Net::Server base types, to subclass other server types via an
additional server_type argument.
net-server PreFork
net-server HTTP # becomes a HTTP server in the Fork flavor
net-server HTTP server_type PreFork # preforking HTTP server
"port"
Port to bind upon. Default is 80 if running a HTTP server as root, 8080 if running a HTTP server as non-root, or 20203 otherwise.
Multiple value can be given for binding to multiple ports. All of the methods for specifying port attributes enumerated in Net::Server
and Net::Server::Proto are available here.
net-server port 20201
net-server port 20202
net-server port 20203/IPv6
"host"
Host to bind to. Default is *. Will bind to an IPv4 socket if an IPv4 address is given. Will bind to an IPv6 socket if an IPv6
address is given (requires installation of IO::Socket::INET6).
If a hostname is given and "ipv" is still set to 4, an IPv4 socket will be created. If a hostname is given and "ipv" is set to 6, an
IPv6 socket will be created. If a hostname is given and "ipv" is set to * (default), a lookup will be performed and any available IPv4
or IPv6 addresses will be bound. The "ipv" parameter can be set directly, or passed along in the port, or additionally can be passed
as part of the hostname.
net-server host localhost
net-server host localhost/IPv4
There are many more options available. Please see the Net::Server documentation.
AUTHOR
Paul Seamons <paul at seamons.com>
LICENSE
This package may be distributed under the terms of either the
GNU General Public License
or the
Perl Artistic License
perl v5.18.2 2012-06-12 NET-SERVER(1)