Sponsored Content
Top Forums Shell Programming and Scripting How to print the next line by searching with different patterns in AIX server? Post 302652285 by tejastrikez on Thursday 7th of June 2012 01:37:35 AM
Old 06-07-2012
Hi,
I tried with the above perl command, but its thowring error.

where my xml file contains,
Code:
<NameValuePair>
            <name>Security/SharedResources/Shared/JNDI/Username</name>
            <value>user</value>
        </NameValuePair>
        <NameValuePair>
            <name>Security/SharedResources/Shared/JNDI/Password</name>
            <value>u23r</value>
        </NameValuePair>
        <NameValuePair>
            <name>Security/SharedResources/Shared/JNDI/URL</name>
            <value>tibjmsnaming://aix123.ttgplc.net:11240,tibjmsnaming://aix123.ttgplc.net:11240</value>
        </NameValuePair>
                <!--- Public EMS Server Settings -->
        <NameValuePair>
            <name>Security/SharedResources/Shared/JNDI-Public/Password</name>
            <value>u23r</value>
        </NameValuePair>
        <NameValuePair>
            <name>Security/SharedResources/Shared/JNDI-Public/Username</name>
            <value>user</value>
        </NameValuePair>
        <NameValuePair>
            <name>Security/SharedResources/Shared/JNDI-Public/URL</name>
            <value>tibjmsnaming://aix123.ttgplc.net:11230,tibjmsnaming://aix123.ttgplc.net:11230</value>
        </NameValuePair>

and the patterns which i want to search are placed in a txt file, contains,
Code:
Security/SharedResources/Shared/JNDI/Password
Security/SharedResources/Shared/JNDI/ContextUrl
Security/SharedResources/Shared/JNDI/Username
Security/SharedResources/Shared/JNDI-Public/Password
Security/SharedResources/Shared/JNDI-Public/ContextUrl
Security/SharedResources/Shared/JNDI-Public/Username

Now i want to print the next line of xml file using the above patterns and save it to another file.

Please help me out from this issue..

---------- Post updated at 12:37 AM ---------- Previous update was at 12:36 AM ----------

the logic has to be work in AIX server..

Last edited by Franklin52; 06-07-2012 at 03:59 AM.. Reason: Please use code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

searching for two or more patterns in a line

how can I search for two or more patterns in one line using grep? for example if I want to show only the lines that have patterns "abc" and "123"? and what if I want to show only the lines that have either "abc" or "123" in them? any hint apprecited (4 Replies)
Discussion started by: metalwarrior
4 Replies

2. Shell Programming and Scripting

Searching patterns in 1 file and deleting all lines with those patterns in 2nd file

Hi Gurus, I have a file say for ex. file1 which has 3500 lines in it which are different account numbers and another file (file2) which has 230000 lines in it. I want to read all the lines in file1 and delete all those lines from file2 which has that same pattern as in file1. I am not quite... (4 Replies)
Discussion started by: toms
4 Replies

3. Shell Programming and Scripting

Match multiple patterns in a file and then print their respective next line

Dear all, I need to search multiple patterns and then I need to print their respective next lines. For an example, in the below table, I will look for 3 different patterns : 1) # ATC_Codes: 2) # Generic_Name: 3) # Drug_Target_1_Gene_Name: #BEGIN_DRUGCARD DB00001 # AHFS_Codes:... (3 Replies)
Discussion started by: AshwaniSharma09
3 Replies

4. Shell Programming and Scripting

print the next line by searching with different patterns

Hi, I am having an '.xml' file with 'n' number of lines and also having another file with '.txt' format contains values which i want to search. Now I want to print the next line with the pattern which i am searching in '.xml' file. And the loop has to repeat for different patterns which... (5 Replies)
Discussion started by: tejastrikez
5 Replies

5. Shell Programming and Scripting

Fetch the different data by searching with a same variable from a file in AIX server

Hi, I am trying to fetch the different values in an xml file by searching with the same variable in AIX Server. <name>SharedResources/Shared/JNDI/Username</name> <value>admin</value> <name>SharedResources/Shared/JNDI/Username</name> ... (1 Reply)
Discussion started by: tejastrikez
1 Replies

6. Shell Programming and Scripting

Print mutliple patterns in a line using sed

Hi, I am trying to print multiple patterns in a line using sed. But it is printing only the last occurance of a pattern. If the line is the the output should be Lookup Procedure|Stored proc But the output I am getting is Stored proc The code I am using is echo... (9 Replies)
Discussion started by: kedar_laveti
9 Replies

7. Shell Programming and Scripting

Print line between two patterns when a certain pattern matched

Hello Friends, I need to print lines in between two string when a keyword existed in those lines (keywords like exception, error, failed, not started etc). for example, input: .. Begin Edr ab12 ac13 ad14 bc23 exception occured bd24 cd34 dd44 ee55 ff66 End Edr (2 Replies)
Discussion started by: EAGL€
2 Replies

8. Shell Programming and Scripting

Find matched patterns and print them with other patterns not the whole line

Hi, I am trying to extract some patterns from a line. The input file is space delimited and i could not use column to get value after "IN" or "OUT" patterns as there could be multiple white spaces before the next digits that i need to print in the output file . I need to print 3 patterns in a... (3 Replies)
Discussion started by: redse171
3 Replies

9. Shell Programming and Scripting

How to print line if two lines above it matches patterns.?

Hi, I could only find examples to print line before/after a match, but I'd need to print line after two separate lines matching. E.g.: From the below log entry, I would need to print out the 1234. This is from a huge log file, that has a lot of entries with "CLIENT" and "No" entries (+ other... (3 Replies)
Discussion started by: Juha
3 Replies

10. Shell Programming and Scripting

How to print two matched patterns only from each line?

My input looks like this. # Lot Of CODE Before AppType_somethinglese=$(cat << EOF AppType_test1='test-tool/blatest-tool-ear' AppType_test2='test/blabla-ear' # Lot Of CODE After I want to print text betwen 1) _ and = and 2)/ and ' from each line and exclude lines with "EOF". Output... (2 Replies)
Discussion started by: kchinnam
2 Replies
asadmin-create-connector-resource(1AS)				   User Commands			    asadmin-create-connector-resource(1AS)

NAME
asadmin-create-connector-resource, create-connector-resource - registers the resource with the specified JNDI name SYNOPSIS
create-connector-resource --user admin_user [--password admin_password] [--host localhost] [--port 4848] [--secure|-s] [--passwordfile filename] [--terse=false] [--echo=false] [--interactive=true] --poolname connector_connection_pool_name [--enabled=true] [--description description] jndi_name Registers the resource with the specified JNDI name. The connector connection pool must already exist. This command is supported in remote mode only. OPTIONS
--user authorized domain application server administrative username. --password password to administer the domain application server. --host machine name where the domain application server is running. --port port number of the domain application server listening for administration requests. --secure if true, uses SSL/TLS to communicate with the domain application server. --passwordfile file containing the domain application server password. --terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well- formatted data for consumption by a script. Default is false. --echo setting to true will echo the command line statement on the standard output. Default is false. --interactive if set to true (default), only the required password options are prompted. --poolname name of the connection pool connector resource. If two or more resource elements point to the same connection pool element, they will use the same pool connections at runtime. --enabled determines whether the resource is enabled at runtime. If a resource is not enabled, you are not able to use the resource. Use the set command to enable or disable resources. --description text description of the connection pool. OPERANDS
jndi_name JNDI name of the resource to be created. Example 1: Using the create-connector-resource command Execute the example described for create-connector-connection-pool command before trying out this example. asadmin> create-connector-resource --user admin1 --password adminadmin1 --host pigeon --port 5001 --poolname jms/qConnPool --description "creating a sample connector resource" jms/qConnFactory Command create-connector-resource executed successfully EXIT STATUS
0 command executed successfully 1 error in executing the command asadmin-delete-connector-resource(1AS), asadmin-list-connector-resources(1AS) J2EE 1.4 SDK March 2004 asadmin-create-connector-resource(1AS)
All times are GMT -4. The time now is 07:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy