s*****w 发帖数: 1527 | 1 那,你们吵着要javascript的,
http://www.mitbbs.com/article/Programming/31476255_3.html
看你们怎么解。
If i don't want to use child_process, how to do it please ?
The following is what i really need: delete line 1~4, and last line:
/usr/bin/sed -i '1,4d;$d' myfile
What happens if this is a very large binary file ?
Thanks ! | s*****w 发帖数: 1527 | 2 人呢?
我老现在只能用child process 了。
第一方案
waterfall
{
fs.rename(originalFile, newFile),
find info in the 2nd line of the newFile,
delete last line of the newFile (child_process.exec("sed '$ d' newFile")
...
}
第二方案
child_process.exec("do_all_stuff.py")
大牛们怎么看? |
|