avatar
号召大家为地震捐款# Environmental - 环境科学与工程
p*g
1
I want to write a program to read a log file output from another program.
The file could be quite large. And I just want to read the last updated
content in it. How to achieve that? c++/python/shell/java... any kind of
language is fine.
I am think of tail -f, but how to read the pipe of "tail -f log | " in a program?
avatar
h*k
2
国难当头, 大家有钱的出钱,有力的出力。站上已经有很多种捐款途径, 大家自己选
择, 俺们是给总领事馆寄支票。
为灾区的人民祈福!祝愿大家平安, 健康!
avatar
p*g
3
ok basically i am trying to do IPC. one way is to use named pipe. first use
makefifo to create a pipe, tail -f to the pipe, and read the pipe in my
program...

program?

【在 p******g 的大作中提到】
: I want to write a program to read a log file output from another program.
: The file could be quite large. And I just want to read the last updated
: content in it. How to achieve that? c++/python/shell/java... any kind of
: language is fine.
: I am think of tail -f, but how to read the pipe of "tail -f log | " in a program?

avatar
Z*X
4
oui
avatar
n*t
5
popen

program?

【在 p******g 的大作中提到】
: I want to write a program to read a log file output from another program.
: The file could be quite large. And I just want to read the last updated
: content in it. How to achieve that? c++/python/shell/java... any kind of
: language is fine.
: I am think of tail -f, but how to read the pipe of "tail -f log | " in a program?

avatar
p*n
6
re...做不了啥就只能捐点钱了,这次实在太惨了

【在 h*****k 的大作中提到】
: 国难当头, 大家有钱的出钱,有力的出力。站上已经有很多种捐款途径, 大家自己选
: 择, 俺们是给总领事馆寄支票。
: 为灾区的人民祈福!祝愿大家平安, 健康!

avatar
a*e
8
I am with you!
avatar
f*y
9
while not just C functions fopen, ftell, fseek, fread, and fclose?
avatar
r*x
10
re

【在 h*****k 的大作中提到】
: 国难当头, 大家有钱的出钱,有力的出力。站上已经有很多种捐款途径, 大家自己选
: 择, 俺们是给总领事馆寄支票。
: 为灾区的人民祈福!祝愿大家平安, 健康!

avatar
T*9
11
用一个while读,然后用一个足够长的buffer hold你读出来的东西,每读一次更新
什么语言都可以,推荐用python,或者perl更快

program?

【在 p******g 的大作中提到】
: I want to write a program to read a log file output from another program.
: The file could be quite large. And I just want to read the last updated
: content in it. How to achieve that? c++/python/shell/java... any kind of
: language is fine.
: I am think of tail -f, but how to read the pipe of "tail -f log | " in a program?

avatar
o*e
12
看到板上常见的几个ID都捐了,赞!
avatar
n*a
13
If the log file is on the SAME machine,and the operating system is Windows,
the most efficient way is to use Memory Mapped File, i.e., map the data file
into the address space of you process.
avatar
v*n
14
Y, I did it yesterday through 中国红十字基金会网
http://www.crcf.org.cn/donationol/donation.asp

【在 h*****k 的大作中提到】
: 国难当头, 大家有钱的出钱,有力的出力。站上已经有很多种捐款途径, 大家自己选
: 择, 俺们是给总领事馆寄支票。
: 为灾区的人民祈福!祝愿大家平安, 健康!

avatar
T*9
15
in linux, it is mmap, hehe

,
file

【在 n**a 的大作中提到】
: If the log file is on the SAME machine,and the operating system is Windows,
: the most efficient way is to use Memory Mapped File, i.e., map the data file
: into the address space of you process.

avatar
m*l
16
昨天晚上我家领导已经向我传达这个精神了。
我家在北方,知道家里没事之后就没太关注。
今天上网看了几条新闻之后,觉得如果不做点什么都对不起自己良心啊!
大家看看除了捐钱以外,还有什么能帮上忙出上力的事情可做。
avatar
t*9
17
支持!
最好选国内的机构或者使馆,而不是美国的机构。

【在 h*****k 的大作中提到】
: 国难当头, 大家有钱的出钱,有力的出力。站上已经有很多种捐款途径, 大家自己选
: 择, 俺们是给总领事馆寄支票。
: 为灾区的人民祈福!祝愿大家平安, 健康!

avatar
l*u
18
Agree. It would be a lot quicker to donate to an organization in China. My
parents just finished their trip in the US and returned back to China
yesterday. I will ask them to donate RMB on my behalf.

【在 t*******9 的大作中提到】
: 支持!
: 最好选国内的机构或者使馆,而不是美国的机构。

avatar
t*t
19
说的有道理。已经给芝加哥大使馆寄了支票。
(网上很多捐献的链接打不开,不知道是不是因为太堵了。。。)

【在 t*******9 的大作中提到】
: 支持!
: 最好选国内的机构或者使馆,而不是美国的机构。

avatar
l*u
20
Here is a link that works.
I just donated using my credit card, it's quick and easy.
https://ssl.charityweb.net/mercycorps/giftbasket/donation.htm?pDonorIntent=
ChinaEarthquake

【在 t*********t 的大作中提到】
: 说的有道理。已经给芝加哥大使馆寄了支票。
: (网上很多捐献的链接打不开,不知道是不是因为太堵了。。。)

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。