Solaris 上shell解析xml

ladofwind 2013-06-20 04:25:22
<?xml version="1.0" encoding="ISO-8859-1"?>
<properties port="10000" URI="tcp://localhost" />

怎么把port的值解析出来
...全文
333 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
ladofwind 2013-06-20
  • 打赏
  • 举报
回复
有办法吗? sed '/port=/!d; s/.*port="\([0-9]\+\)".*/\1/' file 这样不行,

1,543

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 Solaris
社区管理员
  • Solaris
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧