免费注册 查看新帖 |

Chinaunix

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

[文本处理] (已解决,谢谢大家)sed: -e expression #1, char 29: unterminated `s' command [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2018-09-12 16:30 |显示全部楼层 |倒序浏览
本帖最后由 greaterwei 于 2018-09-12 19:01 编辑

求助报错:
cat structures.dat
Ni-FA 3 3 2
Ni-FA-GeomOptFix 3 3 2



cat runsim.sh
for m in Output  
do
  mkdir $m
  cd $m
for n in $(cat ../structures.dat | awk '{print $1}')
do
   mkdir $n
   cd $n
cat > simulation.input    <<EOF
FrameworkName $n
UnitCells 1 1 1
BlockPocketsFileName  ${n}_1.7block
EOF

  uca=$(cat ../../structures.dat | grep -w $n | awk '{print $2}')
  ucb=$(cat ../../structures.dat | grep -w $n | awk '{print $3}')
  ucc=$(cat ../../structures.dat | grep -w $n | awk '{print $4}')
  sed -i "s/^.*UnitCells.*$/UnitCells $uca $ucb $ucc/" simulation.input
    cd ..
done
    cd ..
done


sh runsim.sh
报错sed: -e expression #1, char 29: unterminated `s' command
找不到原因,谢谢大家。

论坛徽章:
0
2 [报告]
发表于 2018-09-12 17:28 |显示全部楼层
本帖最后由 greaterwei 于 2018-09-12 19:03 编辑

回复 2# o枫叶o飘零

论坛徽章:
0
3 [报告]
发表于 2018-09-12 18:58 |显示全部楼层
回复 5# o枫叶o飘零

明白了,谢谢!

论坛徽章:
0
4 [报告]
发表于 2018-09-12 18:58 |显示全部楼层
回复 6# Shell_HAT

明白了,谢谢版主!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP