julia文件合并排序.jl
2016-03-29 18:44
246 查看
julia文件合并排序.jl
""" julia文件合并排序.jl http://bbs.bathome.net/thread-39841-1-1.html 2016年3月29日 17:29:48 codegay 思路如crlf所说,找出不存target中id,合并然后sort排序就可以. """ indexio=open("index2.txt") targetio=open("target2.txt") indtxt=[strip(r) for r in readlines(indexio)] #@show indtxt tartxt=readlines(targetio) tarind=[split(r)[1] for r in tartxt] #@show tarind notin=filter(x -> !(x in tarind),indtxt) @show notin notin=[string(r,"\r\n") for r in notin] #@show sort([tartxt;notin]) result=open("out.txt","w+") write(result,sort([tartxt;notin])) close(indexio) close(targetio) close(result) #[Finished in 4.3s]
相关文章推荐
- 【python】dict。字典
- 几个可用的类的分享
- 扩展实体类的使用
- iOS越狱原理详解
- ~$吐槽“奇葩求职者”极品求职让人伤不起
- 将博客搬至CSDN
- js测验(w3c)
- 虚幻引擎自带的创建插件的插件
- java转换json需要导入的jar包,org/apache/commons/lang/exception/NestableRuntimeException
- 扣丁学堂笔记第15天文件管理与XML、JSON解析
- 虚幻引擎自带的创建插件的插件
- 1004. Counting Leaves (30)
- 网友疯狂吐槽奇葩面试经历
- Caffe bug fixing List
- iOS开发学习之 - 照片框架详解
- libcef mfc(2)
- C#中的多线程 - 基础知识
- 第四周项目三:随机函数应用于游戏
- 文字环绕模式
- 大小的比较