Database Administration (MOSC)

MOSC Banner

scripting help

edited Nov 27, 2013 7:01AM in Database Administration (MOSC) 1 commentAnswered
ode:
for service in `crsctl status res -n $host| grep -E "ora\.$database\.(.+)\.svc" |


In the above code I want to further extract the output skipping database name and .svc 
For example,below is the sample output for code specifically for only one database :

Code:
 crsctl status res -n dev-oragrid-ux01| grep -E "ora.cmdbut.(.+)\.svc"

NAME=ora.cmdbut.boms10.world.svc
NAME=ora.cmdbut.boms_cmdbut_01.world.svc
NAME=ora.cmdbut.cmdbut_01.svc

In the code $host=dev-oragrid-ux01 and $database=cmdbut 
Now out of each 3 outputs I want only boms10.world , boms_cmdbut_01.world and cmdbut_01 which means that I want to extract string whihc is after $database and before .svc

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center