源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

ruby 去掉文件里重复的行

  • 时间:2022-12-12 05:20 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:ruby 去掉文件里重复的行
old = File.open(ARGV[0]).collect new = File.open(ARGV[1],"a+") for i in 0..old.length-1 new.write(old.uniq[i]) end ##或简单两行也可以如qc.rb old = File.open(ARGV[0]).collect puts old.uniq 然后qc.rb dic.dic >new.dic
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部