亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区
Chinaunix
標(biāo)題:
關(guān)于awk取值問(wèn)題
[打印本頁(yè)]
作者:
zhaochao1943
時(shí)間:
2013-12-05 18:52
標(biāo)題:
關(guān)于awk取值問(wèn)題
content: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title></title><style type="text/css">* { margin:0; padding:0; }</style></head>
請(qǐng)問(wèn)我如何取出content后的所有內(nèi)容
作者:
zhaochao1943
時(shí)間:
2013-12-05 18:57
新手請(qǐng)教啊
作者:
yestreenstars
時(shí)間:
2013-12-05 18:58
本帖最后由 yestreenstars 于 2013-12-05 18:58 編輯
目測(cè):
awk 'sub(/^content: /,"")'
復(fù)制代碼
sed 's/^content: //'
復(fù)制代碼
作者:
zhaochao1943
時(shí)間:
2013-12-05 18:58
求大師幫幫忙
作者:
zhaochao1943
時(shí)間:
2013-12-05 19:06
親 兩個(gè)都取不出來(lái)
回復(fù)
3#
yestreenstars
作者:
reyleon
時(shí)間:
2013-12-05 19:07
你是要哪一段結(jié)果啊,麻煩把你想要的結(jié)果發(fā)出來(lái)瞅瞅可好?
作者:
zhaochao1943
時(shí)間:
2013-12-05 19:11
content:后面的所有內(nèi)容 也就是排除content:別的都要
回復(fù)
6#
reyleon
作者:
reyleon
時(shí)間:
2013-12-05 19:19
回復(fù)
7#
zhaochao1943
那 3 樓的就符合你的要求吶,我也提供個(gè)
sed 's/^[^ ]\+ //' file
復(fù)制代碼
作者:
zhaochao1943
時(shí)間:
2013-12-05 19:22
我試用了 但是這樣好像不行 我一會(huì)把我的文件貼出來(lái)大家看下 謝謝了
回復(fù)
8#
reyleon
作者:
zhaochao1943
時(shí)間:
2013-12-05 19:26
id: 19
send_adr: NULL
receive_addr:
863@qq.com
content: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title></title><style type="text/css">* { margin:0; padding:0; }</style></head><body><table width="650" cellspacing="0" cellpadding="0"><tbody><tr><td style="height:52px;padding-left:20px;padding-right:20px;background:#f7f7f7;border-bottom:1px solid #e6e5e5;"><img src="http://image10.renmaiku.com/email/mail_top_title.gif" style="float:right;margin-top:6px;"><a href="http://www.binzhi.com"><img style="border:none;" src="http://image10.renmaiku.com/email/email_binzhi_logo.gif"></a></td></tr><tr> <td style="padding-left:20px;padding-right:20px;padding-top:18px;"><div style="background:url(
http://image10.renmaiku.com/email/mail_gray_bg.gif
) center bottom no-repeat;height: 58px; margin-bottom: 14px; padding-bottom: 12px;"> <div style="background:url(
http://image10.renmaiku.com/public/mail_header_bg.gif
) no-repeat center top; height: 54px;margin: 0 auto; width: 580px;"> <span style="color:#333;font-size:12px;float:left;display:block;line-height:50px;margin-right:10px;">賓至網(wǎng)</span> <span style="display:block;float:left;border:1px solid #ff9a35;height:50px;width:50px;border-radius:25px;overflow:hidden;"><img src="http://photo.binzhi.com/fs/HEAD_UPLOAD-3379735-head-small.jpg" border="0"/></span><span style="color:#333;font-size:12px;float:right;display:block;line-height:50px;">徐國(guó)君</span> <span style="display:block;float:right;border:1px solid #ff9a35;height:50px;width:50px;border-radius:25px;margin-right:10px;overflow:hidden;"> <img src="http://image10.renmaiku.com/head/no_img-3.gif" border="0"/></span></div></div></td></tr><tr> <td style="padding-left:40px;padding-right:20px;padding-bottom:50px;"><h2 style="height:30px;line-height:30px;font-size:14px;font-weight:bold;color:#666;margin-bottom:12px;">:</h2> <p style="text-indent:2em;line-height:32px;font-size:12px;color:#666;padding-bottom:30px;">的一份信給您的一份信給您的一份信</p><div style="text-align:right;color:#666;font-size:12px;line-height:30px;"><span>賓至網(wǎng) 致</span><br><a style="color:#0277c9;text-decoration:none;" href="#"></td></tr></tbody></table></body></html>
title: 給您的一份信
這是我提取出的一部分?jǐn)?shù)據(jù) 我用來(lái)發(fā)送郵件用的 我要分別提取出 receive_addr和 content:里的內(nèi)容 進(jìn)行郵件發(fā)送 地址好提取 但是內(nèi)容的話不知道怎么提取
作者:
yestreenstars
時(shí)間:
2013-12-05 19:32
回復(fù)
10#
zhaochao1943
awk 'sub(/^ *content: /,"")'
復(fù)制代碼
作者:
reyleon
時(shí)間:
2013-12-05 19:34
回復(fù)
10#
zhaochao1943
xargs -l < file | sed '/^receive_addr\|^content/!d;s/^[^ ]\+ //'
復(fù)制代碼
作者:
zhaochao1943
時(shí)間:
2013-12-06 09:54
謝謝
回復(fù)
11#
yestreenstars
作者:
zhaochao1943
時(shí)間:
2013-12-06 09:54
謝謝
回復(fù)
12#
reyleon
作者:
lxzkenney
時(shí)間:
2013-12-06 20:42
提示:
作者被禁止或刪除 內(nèi)容自動(dòng)屏蔽
作者:
xzywell
時(shí)間:
2013-12-08 20:38
grep "content:" 111.txt | awk -F "content:" '{printf $2}' > in.txt
復(fù)制代碼
試試這個(gè)
歡迎光臨 Chinaunix (http://www.72891.cn/)
Powered by Discuz! X3.2