免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2403 | 回复: 3
打印 上一主题 下一主题

[文本处理] shell脚本问题,求解 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2018-01-19 16:21 |只看该作者 |倒序浏览
grep -wf n1.properties a.txt | xargs -i sed -i '/{}/d' n1.properties a.txt
为什么之前在别的linux上就能运行,然后现在测试就报错了???
找了好几个同事的电脑   测试也是不行

sed:-e 表达式 #1,字符 14:未知的命令:“1”
出现这个 错误,求解


论坛徽章:
0
2 [报告]
发表于 2018-01-19 16:54 |只看该作者
文件里面有  ↓ ↓ ↓ ↓ ↓  
scale.exp=0/15 * * * * ?
应该是执行的时候把 "/"  识别成了转义字符,怎么才能让他排除 这种情况呢?

论坛徽章:
0
3 [报告]
发表于 2018-01-20 13:36 |只看该作者
scale.exp=0+15 * * * * ?
为什么  我替换成了 + 号  
不报错了,怎么还是删除不掉呢,别的相同的行都可以删除,为什么这一行不会删啊??
求解。。。。搞不出来

论坛徽章:
0
4 [报告]
发表于 2018-01-22 11:12 |只看该作者
file 1
#################### log settings ######################
#####       LEVEL: trace, debug, info, warn, error      ######
#log level of runtime log
log.level.runtime=trace
#directory of logs
path.log.runtime=../logs
path.log.event=../logs
path.vnfd=../vnfd
file.vnfd=config.xml


#won't create a new auto scale task for a vnf in a cetain period, unit:second
auto_scale_task_expiry=180

#################### RCGW Jetty server configuration ######################
jetty.server.port=8183
jetty.server.threads.min=10
jetty.server.threads.max=50
#BASIC authentication configuration
jetty.realm.path=../config/realm.properties
jetty.realm.refresh.interval=0

##################### httpclient time out set(Unit: ms) ################
rcgw.timeout=60000

#################### cronjob time expression ######################
#every 30 minutes from the program start
#second, minute, hour, day, month, week, year
cba.monitor.exp=10 * * * * ?
epcCron.exp=15 * * * * ?
scale.exp=30 * * * * ?
instantiateVnfcron.exp=30 * * * * ?
terminateCron.exp=30 * * * * ?
statisticsExportCronJob.exp =0 0/15 * * * ?
#register.to.Cmgw.cron.exp=30 * * * * ?
#every day 7:00
purgeDBCron.exp=0 0 7 * * ?
#the updatetime timeout to purge db (Unit:day)
purge.vnf.timeout=7
loadDBCron.exp=0 0/5 * * * ?


#ECM query URI
ecm.queryVmsByTenantAndVappId=/ecm_service/vms?$filter=vappId='{vappId}'
ecm.queryVmvnicsByVmId=/ecm_service/vmvnics?$filter=vmId='{id}'
ecm.create.vm=/ecm_service/vms/
ecm.delete.vm=/ecm_service/vms/{vmId}
ecm.order=/ecm_service/orders/{orderid}


#URI of RCGW TO CMGW\, overwrite
cmgw.lifecyclechangesnotification=/v3/vnfs/lifecyclechangesnotification
cmgw.autoScanJobNotification=/v3/vnfs/eventnotification
cmgw.scaleFinishNotification=/v3/vnfs/scaleNotification
cmgw.scaleRequest=/v3/vnfs/scaleRequest
cmgw.register.vnfm=/v3/vnfs/registration

#URI of RCGW to ENM
enm.login=/login
enm.fmxtopo=/fmxadminws/v1/topology/all
enm.fmxact=/fmxadminws/v1/module/activate
enm.fmxdeact=/fmxadminws/v1/module/deactivate
enm.fmxlist=/fmxadminws/v1/module/listLoaded
enm.fmxactfor=/fmxadminws/v1/module/activateFor
enm.fmxevtsim=/fmxadminws/v1/eventsimengine/play

#if the resource file _resource.yaml is needed, default is false
#this file is expected to be generated based on ECM query result and scp to EMS
resfileNeed=false

#whether the pwd in DB is encrypted
rcgw.pwdcrpt=false
rcgw.pwdpwd=123

#whether the ova file need to encrypt
rcgw.ovacrpt=false
rcgw.ovapwd=123


#################################################################
################ cba ssh configuration #####################
#################################################################
cba.oam.cmd.cpustat=clurun.sh -c cpustat
cba.oam.cmd.memstat=clurun.sh -c memstat
cba.oam.cmd.nodestat=cmw-status -v node

#################################################################
################## ossrc ssh configuration ######################
#################################################################

ossrc.cmd.register=/opt/ericsson/arne/bin/import.sh -import -f
ossrc.cmd.deregister=/opt/ericsson/arne/bin/import.sh -import -f
ossrc.cmd.notification=/opt/ericsson/fm/fmx/bin/fmxes
ossrc.cmd.alarm=/opt/ericsson/fm/fmx/bin/fmxes
ossrc.cmd.rm.templates=/var/opt/ericsson/arne/rmTemplate.sh

ossrc.file.register=_register.xml
ossrc.file.deregister=_termination_alarm.xml
ossrc.file.scaling.alarm=_alarm.xml
ossrc.file.scaling.notification=_scaling_notification.xml
ossrc.file.scaling.suc.notification=_scaling_sucnotification.xml
ossrc.file.healing.alarm=_healing.xml

ems.file.register=_register.xml
ems.file.deregister=_deregister.xml

#last part of yaml file name, it will be like VAPP_NAME_resource.yaml
ossrc.file.resource.yaml=_resource.yaml
#oss-rc xml file template
ossrc.xml.tmpl.alarm=alarm_template.xml
ossrc.xml.tmpl.register=register_template.xml
ossrc.xml.tmpl.deregister=deregister_template.xml

#################################################################
################## enm cli configuration ######################
#################################################################
enmcli.result_available=result_available
enmcli.enm_output=enm_output
enmcli.http_status_code=http_status_code

#config for alarm template start
#use \, instead of ,
alarm.object.of.reference=SubNetwork=ONRM_ROOT_MO\,SubNetwork=CMCC\,ManagedElement={vnfName}
alarm.system.type=WPP
alarm.record.type=1
#config for alarm template end

#config for deregister template start
alarm.deregister.model.version=1
alarm.deregister.model.importVersion=13.2
#use \, instead of ,
alarm.deregister.fdn=SubNetwork=ONRM_ROOT_MO\,SubNetwork=CMCC\,ManagedElement={vnfName}
#config for deregister template end

#URL parameters when ECM delete VAPP
ecm.delete.bsvs=
ecm.ovapkg.is.public=true
ecm.ovapkg.chunk.size=512000
#ecm.tenant.name=ericsson
#ecm.tenant.password=1213456

#alarm id definition
healing.notification=1
scaling.alarm=2
scaling.notification=3
scaling.success.notification=4
termination.alarm=5
instantiation.notification=6
scaling.failure=7

#waiting time(unit=second)
cq.cba.retry=30
cq.cba.check.interval=1
cq.cba.timeout=480
cq.ecm.retry=30
cq.ecm.check.interval=1
cq.ecm.timeout=300

###cba remote save path for vnfconfig files###
cba.postconfig.cmd.chmod=chmod 755 /root/postConfig.sh
cba.postconfig.cmd.run=/root/postConfig.sh

###After instantiate ,the wait time to connect cba, Unit:s ###
instantiate.job.timeout=300
terminate.job.timeout=300
scale.job.timeout=600

###VNF type conversion###
VNF_TYPE=vmme;vsgw;vcscf;vmtas   
vmme_TYPE_SPEC=vmme
vmme_TYPE_ENM=SGSN-MME
vmme_KPI_Mon=/opt/ericsson/vnfcloud/Tool/VNF_KPI/kpi_monitor_vMME.py
vmme_Scale_Tool=/opt/ericsson/vnfcloud/Tool/VNF_Scale/scaling_vMME.py
vsgw_TYPE_SPEC=vsgw
vsgw_TYPE_ENM=EPG
vsgw_KPI_Mon=/opt/ericsson/vnfcloud/Tool/VNF_KPI/kpi_monitor_vSGW.py
vsgw_Scale_Tool=/opt/ericsson/vnfcloud/Tool/VNF_Scale/scaling_vSGW.py
vsgw_NETWORK=IMS
vcscf_TYPE_SPEC=visbg;vCSCF
vcscf_TYPE_ENM=CSCF
vmtas_TYPE_SPEC=vvoltetas
vmtas_TYPE_ENM=MTAS

###scale thread num limit####
scale.thread.pool.size=10

### KPI sampling ####
sample.number=4
log.level.runtime=debug
scale.exp=0/15 * * * * ?
###instantiate process timeout for scp vnfconfig###
instatntiate.vnfconfig.timeout=180
VNF_TYPE=vmme;vsgw;vcscf;vmtas
vcscf_Graceful_Scalein_Tool=/opt/ericsson/vnfcloud/Tool/Graceful_Scalein/cba_handler.py
vmtas_Graceful_Scalein_Tool=/opt/ericsson/vnfcloud/Tool/Graceful_Scalein/cba_handler.py
### sampling ####
kpi.sample.number=4
cba.sample.number=4
##instantiation flow: whether to verify CBA node status for created additional VMs in large scale deployment ###
cba.verifyNode.flag=true
### whether to connect EMS ###
ems.connection=true
### OMC ###
vnf.handler.path=/opt/ericsson/vnfcloud/RCGW/ENM/.manoflag
### sleep timer
scale.sleep=90000
### sleep timer
init.sleep=90000
###init thread num limit####
init.thread.pool.size=10
###enm query vnfstatus uri###
enm.queryvnfstatus=/rest/v2/GetVNFStatus/{VNFName}
###check vnfstatus method: 0: not check, 1:check through rest API, 2:chekc OMC File, default 0.###
ENM.check.vnfstatus.method=1
###need cookies access enm rest, 1:yes, 0: no, default 0###
ENM.rest.need.cookie=0
####msgcode for scaling and spilt by ; ###
msgcode.scale=ECMAC013;
####whether call postconfig in instantiate processing,0:no, 1:yes,default:0####
call.postconfig=0
file 2
log.level.runtime=debug
scale.exp=0/15 * * * * ?
VNF_TYPE=vmme;vsgw;vcscf;vmtas
这个那两个文件  file 1  是  n1.properties
a.txt  是  file 2     求大神帮忙解决下



您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP