对于其中一个精彩的向导,我已经玩弄了awk,并且还没有完成这个计算出来。所以没有进一步的延迟,这是我正在努力解决的问题。对于每一行,创建一个新行以添加来自另一个文件的多个条目
我有两个文件
文件1看起来是这样的(实际的文件中有数百行w的随机单词)
somewebsite
someotherwebsite
somestinking
blahblah
foobar
文件2看起来是这样的(许多顶级域名,多了很多)
.com.th
.co.uk
.com
.de
.ath.cx
好吧,我需要file1中的每一行,以便从一个新行上的file2中添加每个tld ....
为了进一步阐述,需要复制file1中的每一行,以便它可以将file2中的每个tld添加到file1中的每个条目。
输出应该是这样的:
somewebsite.com.th
somewebsite.co.uk
somewebsite.com
somewebsite.de
somewebsite.ath.cx
someotherwebsite.com.th
someotherwebsite.co.uk
someotherwebsite.com
someotherwebsite.de
someotherwebsite.ath.cx
somestinking.com.th
somestinking.co.uk
somestinking.com
somestinking.de
somestinking.ath.cx
blahblah.com.th
blahblah.co.uk
blahblah.com
blahblah.de
blahblah.ath.cx
foobar.com.th
foobar.co.uk
foobar.com
foobar.de
foobar.ath.cx
我希望是有道理的给别人,我试着去弄清楚如何做到这一点,它肯定有趣所有的方法,我都失败了。
预先感谢您。我相信我不是现在,过去或未来尝试过这样的人,所以一个解决方案肯定会帮助下一个尝试这样做的人。
反而张狂的赞美,你应该:1)添加代码,你有什么企图,或2。 )只是说:_im懒惰,所以给我一个脚本_。 – jm666
我真的在寻求帮助。这些评论是不必要的。 – derpderpalert
您应该阅读[帮助]。在这里,我们帮助开发人员克服工作中的问题你没有发布任何可称为“工作”的东西,因此你甚至没有试图解决这个问题。所以,你只需要一个免费的开发人员工作,并错过了网站的重点。 – jm666