某目录a下有n个文件和子目录,文件里面有(可能没有) x_to_local_lang('x') 字符串。
现在需要把所有文件内的 x 抓出来,合成一个元素唯一性的数组,最后存进文件i18n.txt。
我的思路:
scan file with -r
catch x_to_local_lang('x') as $i18n['en_us'][x], include $__file__, $__line__
shift $i18n['en_us'][x], >> i18n.txt
可是,脚本我竟然写不出来……
简单面试题
-
- 帖子: 2376
- 注册时间: 2006-09-21 14:28