请修改语法错误 [英] Syntax error correction please

查看:102
本文介绍了请修改语法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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 -istatus = | MonitoredAddress | up at | down at | ^ \| sed s /\".* MonitoredAddress \ [// g | sed s /transitions = \ [//



我尝试过:



需要在代码中进行修正。

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.

推荐答案

1; for(i = 1; i< NF; i ++){if(i> 2) )printf(%s,sp2); print sp
1;for (i=1;i<NF;i++) {if(i>2) printf("%s",sp2) ; print sp""


i}}'| egrep -istatus = | MonitoredAddress | up at | down at | ^ \| sed s /\".* MonitoredAddress \ [// g | sed s /transitions = \ [//



我尝试了什么:



需要修改代码。
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.


不要在一行中找到错误位置。单独执行每个命令,存储结果,并使用shell脚本将其传递给下一个命令。



但是,似乎只有一个(不匹配的)非
$标准双引号(复制和粘贴时显示为而不是) b $ b
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=/"/


这篇关于请修改语法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆