Click here to Skip to main content
16,015,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
sm console GET AllMonitoredEntities |sed s/.*name=/”/|sed s/”, 201″/” 201″/g|awk -F, ‘BEGIN{sp=” “;sp2=” “}{print $1;for (i=1;i<NF;i++) {if(i>2) printf(“%s”,sp2) ; print sp””$i }}’|egrep -i “status=|MonitoredAddress|up at|down at|^\””|sed s/”.*MonitoredAddress\[“/” “/g|sed s/“transitions=\[“/””/

What I have tried:

need a correction in the code.
Posted
Updated 31-Jan-18 0:20am

1 solution

Don't do it in one line for finding the error position. Execute each command separately, store the result, and pass it to the next command using a shell script.

However, there seems to be a single (unmatched) non-standard double quote (when copy and pasting here it shows as and not as ") at
sed s/.*name=/"/
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900