多个diff脚本: [英] multiple diff script:

查看:89
本文介绍了多个diff脚本:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我想创建一个脚本,将2条路径作为参数,并找到它们之间的匹配文件。

然后在具有相同名称的每对文件之间进行比较,如果它们的内容不相似则输出错误。


谢谢,

Hello All,

i''d like to make a script that gets 2 paths as a parameters and find the matching files between them.
then it compare between each pair of files with the same name, and outputs error if their contents isn''t similar.


thanks,

推荐答案

让我们看看你到目前为止所写的内容,试图实现你的目标。
Lets see what you have written so far to try and accomplish your goal.


我会尽力专注于让我完成任务:


1.我不知道如何使用相当于perl中的ls。

用于保存@list目录中的文件列表。


2.什么是差异在pel中的比较(比较2个文件)


这就是我想的所有
i''ll try to focus on what hold me to achieving my task:

1. i don''t know how to use the equivalent of ls in perl.
to save a list of files in the directory within a @list.

2. what is the equivalent of diff in pel (compare 2 files)

thats all i think


diff的等价物是File :: Compare模块。请参见File :: Compare手册页。有一些方法可以将文件夹中的内容列表放入数组中。最基本的方法:

the equivalent of diff is the File::Compare module. See the File::Compare man page. There are a few wqays to get a list of stuff that is in a folder into an array. The most basic way:

展开 | 选择 | Wrap | 行号


这篇关于多个diff脚本:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆