1111 LINUX CAT sql express 今天同事发现BUG,就是合并脚本的BUG,代码严重混乱,还有一个问题就是 SORT 的问题 PHP MYSQL 定时 数据备份 crontab mysqldump 2
6. 合并两个文件
1) 取出两个文件的合集(重复行只保留一份) cat file1 file2 &line; sort |uniq
2) 取出两个文件的交集(只留下同时在两个文件重复行) cat file1 file2 &line; sort |uniq -d
3) 删除交集,留下其他的行 cat file1 file2 &line; sort |uniq -u
所以我的本意是导出原来的定时脚本,然后逐个删除交集,最后再重新取出用户指定脚本的合集。
OLD.CRON ,分别 cat file1 file2 &line; sort |uniq -u
和 1 2 3 4 四个脚本处理,再分别 cat file1 file2 &line; sort |uniq,结果发现一个大问题。
如果 OLD.CRON只有一行1,那么和1合并之后就是0个字节,再分别和2 3 4 合并,结果就变成了 2 3 4 的合集。
所以我又加了一行, www.shengfang.org
for ($i=1;$i<5;$i++)
system("cat ./cron/$i.cron >>./cron/crontab.cron");
把原来 1 2 3 4的全部再加上去,然后在去掉,我想这样就OK了吧,结果发现更加混乱了。
例如 echo 3>3 生成四个文件,然后 cat 1 >all 生成ALL,此时
cat 1 all &line; sort &line; uniq -u > 1.1 为空
再 cat 1.1 2 &line; sort &line; uniq -u 此时为 2 ,于要求不合
所以设计 再 CAT 一遍,保证不论如何,都有 1 2 3 4,再进行交集处理 cat 1 all &line; sort &line; uniq -u
cat 1 2 3 4 1 > all 模拟已经有了一个,此时正常 2 3 4
cat 1 2 3 4 1 2 > all 模拟已经有了一个,此时 3 4
cat 1 2 3 4 1 2 3 > all 模拟已经有了一个,此时 4
cat 1 2 3 4 1 2 3 4> all 模拟已经有了一个,此时 空 www.shengfang.org
cat 1 2 3 4 1 > all 如果用 CAT 1 2 3 4 >> ALL,cat 1 all &line; sort &line; uniq -u 此时为空什么都没有
奇怪之余,只好再# cat all &line; sort >all1 结果 cat 1 all1 &line; sort &line; uniq -u 然后为空
最后只好 cat all &line; sort &line; uniq > all1 才了结~~~~~~~~~~ www.shengfang.org
Setup Failed. www.shengfang.org
Use the following links to research the source of the failure:
There were errors during setup.
Although the components were installed successfully, some setup errors were detected.
View error log
For information on known setup issues, see the Microsoft Visual Studio readme file, readme.htm, located at the root of the installation source.
For Knowledge Base articles on Visual Studio setup issues and solutions, see KB article 319714, HOW TO: Troubleshoot Visual Studio .NET Installation, at http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q319714.
To find help from other Visual Studio users, try the following newsgroups:
Visual Studio Setup
Microsoft Product Support www.shengfang.org
For details about this setup failure, see the setup log files.
[11/11/05,10:56:53] Microsoft SQL Server 2005 Express Edition April CTP: [2] Error code 1603 for this component means "安装时发生严重错误 www.shengfang.org
"
[11/11/05,10:57:39] Microsoft SQL Server 2005 Express Edition April CTP: [2] Setup Failed on component Microsoft SQL Server 2005 Express Edition April CTP
***EndOfSession*** Visual Studio Team System 2005 Beta 2 安装
不管了随便了 我习惯了VS.NET 2003,现在这个应该称为 VS2005 / VSTS / VSTF