使用道具 举报
Post by zhy2111314 呵呵,原来兄弟这里误解了, [^>] 这在正则表达式中意思就是匹配非>!而不是开头第一个!因为它在[]内部!^相当于非的意思
Post by zBS cu那边有人帮忙解决了... 贴出来大家共勉一下.. /home/lee#cat a <text id="fld-sharing">Folder sharing</text> <text id="fld-sharing-add-user">Add user</text> <text id="fld-sharing-add-group">Add group</text> <text id="fld-sharing-add-all">Add all users</text> <text id="fld-sharing-all-users">All authenticated users</text> <text id="fld-sharing-user">User</text> <text id="fld-sharing-level">Permission level</text> <text id="fld-sharing-owner">Owner</text> <text id="fld-sharing-administrator">Administrator</text> <text id="fld-sharing-editor">Editor</text> <text id="fld-sharing-reader">Reader</text> <text id="fld-sharing-none">None</text> /home/lee#cat b 共享此文件夹 添加用户 添加组 添加所有用户 验证所有用户 用户 共享级别 所有者 管理员 编辑 读取 关闭共享 复制代码/home/lee#\ > while read -u3 a && read -u4 b;do > echo $a|sed "s/>.*</>$b</" >>c.txt > done 3<a 4<b /home/lee#cat c.txt <text id="fld-sharing">共享此文件夹</text> <text id="fld-sharing-add-user">添加用户</text> <text id="fld-sharing-add-group">添加组</text> <text id="fld-sharing-add-all">添加所有用户</text> <text id="fld-sharing-all-users">验证所有用户</text> <text id="fld-sharing-user">用户</text> <text id="fld-sharing-level">共享级别</text> <text id="fld-sharing-owner">所有者</text> <text id="fld-sharing-administrator">管理员</text> <text id="fld-sharing-editor">编辑</text> <text id="fld-sharing-reader">读取</text> <text id="fld-sharing-none">关闭共享</text> 复制代码 谢谢大家帮忙.
怎么看着那么眼熟 ?
本版积分规则 发表回复 回帖后跳转到最后一页