Sponsored Content
Top Forums UNIX for Dummies Questions & Answers I want to compare to alphanumeric value in a unix shell script. Post 302846019 by bakunin on Thursday 22nd of August 2013 10:25:21 PM
Old 08-22-2013
Quote:
Originally Posted by Nsharma3006
Code:
+ '[dvlna002' = 'dvlna002]'
./scriptn: line 6: [dvlna002: command not found

+ '[SERVER' = 'dvlna002]'
./scriptn: line 11: [SERVER: command not found

Have a look again what i told you in post #2. You will find the reason for these two errors there.

I hope this helps.

bakunin
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

shell script cant recognize if else compare

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

How to compare the dates in shell script

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

String compare in shell script

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?

how to compare two lines using shell script? (1 Reply)
Discussion started by: suman_dba1
1 Replies

5. Shell Programming and Scripting

compare dats in the shell script.

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

Comparing Alphanumeric Variables in Shell Script

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

Shell Script to Compare Two Files

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

ksh to compare alphanumeric values from 2 files

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

Howto compare the columns of 2 diff tables of 2 different schemas in UNIX shell script

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

Need to compare numbers in alphanumeric string

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
CREATE 
SERVER(7) PostgreSQL 9.2.7 Documentation CREATE SERVER(7) NAME
CREATE_SERVER - define a new foreign server SYNOPSIS
CREATE SERVER server_name [ TYPE 'server_type' ] [ VERSION 'server_version' ] FOREIGN DATA WRAPPER fdw_name [ OPTIONS ( option 'value' [, ... ] ) ] DESCRIPTION
CREATE SERVER defines a new foreign server. The user who defines the server becomes its owner. A foreign server typically encapsulates connection information that a foreign-data wrapper uses to access an external data resource. Additional user-specific connection information may be specified by means of user mappings. The server name must be unique within the database. Creating a server requires USAGE privilege on the foreign-data wrapper being used. PARAMETERS
server_name The name of the foreign server to be created. server_type Optional server type. server_version Optional server version. fdw_name The name of the foreign-data wrapper that manages the server. OPTIONS ( option 'value' [, ... ] ) This clause specifies the options for the server. The options typically define the connection details of the server, but the actual names and values are dependent on the server's foreign-data wrapper. NOTES
When using the dblink module (see dblink), the foreign server name can be used as an argument of the dblink_connect(3) function to indicate the connection parameters. See also there for more examples. It is necessary to have the USAGE privilege on the foreign server to be able to use it in this way. EXAMPLES
Create a server foo that uses the built-in foreign-data wrapper default: CREATE SERVER foo FOREIGN DATA WRAPPER "default"; Create a server myserver that uses the foreign-data wrapper pgsql: CREATE SERVER myserver FOREIGN DATA WRAPPER pgsql OPTIONS (host 'foo', dbname 'foodb', port '5432'); COMPATIBILITY
CREATE SERVER conforms to ISO/IEC 9075-9 (SQL/MED). SEE ALSO
ALTER SERVER (ALTER_SERVER(7)), DROP SERVER (DROP_SERVER(7)), CREATE FOREIGN DATA WRAPPER (CREATE_FOREIGN_DATA_WRAPPER(7)), CREATE USER MAPPING (CREATE_USER_MAPPING(7)) PostgreSQL 9.2.7 2014-02-17 CREATE SERVER(7)
All times are GMT -4. The time now is 06:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy