亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 1509 | 回復: 6
打印 上一主題 下一主題

Need Help : mask / scrabble fields in a file ? [復制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2004-12-08 17:08 |只看該作者 |倒序瀏覽
hi, anyone can give me some advices ?
   i want to mask or scrabble certain fields(replace it as **** for example) in a log file , requirement is :
parttern one is " pin=12345664, " , the pin number is not fixed length . parttern two is " ENCRYPTED_PIN_BLOCK=12rtdsfqweweweee23w," the encrypt field length is not a fixed one as well , this two field can be appear any line in a file . can be in a same line or different line .

another problem is the log file could be huge in size . 300 M . advisable using a shell script to achieved it ?

i have attached a sample file "sample.gif"

sample.gif

6.04 KB, 下載次數(shù): 252

sample

論壇徽章:
0
2 [報告]
發(fā)表于 2004-12-08 17:18 |只看該作者

Need Help : mask / scrabble fields in a file ?

sed 's/pin=[0-9]\{1,\}/***/' file

I cannot see your attached picture and don't quite understand your second patten.

論壇徽章:
0
3 [報告]
發(fā)表于 2004-12-08 17:21 |只看該作者

Need Help : mask / scrabble fields in a file ?

Or:
sed 's/pin=[0-9]\{1,\}/pin=***/' file

論壇徽章:
0
4 [報告]
發(fā)表于 2004-12-08 17:41 |只看該作者

Need Help : mask / scrabble fields in a file ?

thanks a lot , pls ignore the gif file .
the second pattern is "ENCRYPTED_PIN_BLOCK=****," , THE **** field could be number and alphabet , for example "229A8F53BF8DE2D771D80DD8F4E488081BD69957980" , the length is not fixed .


example line 1
[ 2001-13-14 ] *** REQUESTED *** pin=123455, Cotroller: :getResult:Request: ONWER=master tech , ENCRYPT_PIN_BLOCK=229A8F53BF8DE2D771D80DD8F4E488081BD69957980, KEY=3444

or one pattern in only one line ,

論壇徽章:
0
5 [報告]
發(fā)表于 2004-12-08 18:00 |只看該作者

Need Help : mask / scrabble fields in a file ?

OK, try this one.

sed 's/pin=[0-9]\{1,\}/pin=***/;s/ENCRYPT_PIN_BLOCK=[0-9A-Z]*,./ENCRYPT_PIN_BLOCK=****/'

論壇徽章:
0
6 [報告]
發(fā)表于 2004-12-08 18:00 |只看該作者

Need Help : mask / scrabble fields in a file ?

sed 's/pin=[0-9]\{1,\}/pin=***/;s/ENCRYPT_PIN_BLOCK=[0-9A-Z]*,./ENCRYPT_PIN_BLOCK=****/' file

論壇徽章:
0
7 [報告]
發(fā)表于 2004-12-08 18:16 |只看該作者

Need Help : mask / scrabble fields in a file ?

tested with 350M file with following time statistics :

real 225.03
user 45.58
sys  16.08

thank you so much .
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復

  

北京盛拓優(yōu)訊信息技術有限公司. 版權所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP