I want to extract the following strings from tnsping command : Host, SID, Port number. Sample tnsping output : TNS Ping Utility for Solaris: Version 10.2.0.1.0 - Production on 24-MAY-2011 00:24:33 Copyright (c) 1997, 2005, Oracle. All rights reserved. Used parameter files: /tools/quest/cluster/sqlnet.ora Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL= TCP)(Host=xyz.us.oracle.com)(Port= 1111)) (CONNECT_DATA = (SID = ABC))) OK (0 msec) I want to extract xyz.us.oracle.com, 1111 & ABC and store them in some array. Kindly suggest. Thanks, Satish
In reply to extract host, SID, port number from tnsping command by satyakm79
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |